Page 1 of 1

Conver TIFF to PDF multipages please help

Posted: 2014-03-20T15:41:02-07:00
by pravlm
Hi Folks,

Here is my situation I need to need to convert TIFF to PDF using a BLOB,

1. I read a document in TIFF from a TCP/IP connection. I have got this in to a "std::string" buffer named as "resp".
2. I have written this code to convert it to "PDF"

Code: Select all

using namespace Magick;
InitializeMagick(NULL);
Blob tiffBlob(static_cast<const void *>(resp.c_str()),resp.length());
Image image(tiffBlob);
Blob pdfBlob;
image.write(&pdfBlob,"PDF");

The C++ code dumps core at "image.write" line.

What am I doing wrong ? can some one please help?

Re: Conver TIFF to PDF multipages please help

Posted: 2014-03-25T13:16:27-07:00
by pravlm
Can someone who knows about Magick++ care to respond?

Re: Conver TIFF to PDF multipages please help

Posted: 2014-03-25T13:51:32-07:00
by dlemstra
Which version of ImageMagick are you using? Have you tried to write to another format, e.g. png?

Re: Conver TIFF to PDF multipages please help

Posted: 2014-03-27T13:29:11-07:00
by pravlm
dlemstra wrote:Which version of ImageMagick are you using? Have you tried to write to another format, e.g. png?
Thanks for the response!

I am using this

Version : ImageMagick-6.8.8-0-Q16-windows
Environment : Windows 64 Bit
IDE: Visual Studio 2010 64 Bit
Language : C++

I have tried other format , every format crashes at the same place.