Convert multi page tiff file to pdf
Posted: 2013-04-15T06:53:31-07:00
Hello.
I'm trying to convert a multi page tiff file to pdf using Magick++. I'm using the following code:
The problem is that the resulting pdf file has only one page. Example file: https://docs.google.com/file/d/0B5V7SIE ... sp=sharing
The same file is correctly converted if i use the convert tool (i.e. convert.exe input.tif output.pdf)
Since convert tool works well, i suppose my problem lies in Magick++
I'm using ImageMagick-6.8.4-9 in Windows
I'm trying to convert a multi page tiff file to pdf using Magick++. I'm using the following code:
Code: Select all
#include <Magick++.h>
int main(int argc, char **argv)
{
Magick::InitializeMagick(argv[0]);
Magick::Image img;
img.read(argv[0]);
string imageSpec = "PDF:";
imageSpec += argv[1];
img.write(imageSpec);
return 0;
}
The same file is correctly converted if i use the convert tool (i.e. convert.exe input.tif output.pdf)
Since convert tool works well, i suppose my problem lies in Magick++
I'm using ImageMagick-6.8.4-9 in Windows