The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Isleo
Posts: 4 Joined: 2014-12-23T03:48:23-07:00
Authentication code: 6789
Post
by Isleo » 2014-12-30T03:18:58-07:00
Hello,
I'm trying to convert a PDF to a new PDF (with changes; threshold). The code is something like this:
Code: Select all
string final = dir/someName.pdf;
MagickReadImage(m_wand,final.c_str());
MagickSetImageFormat(m_wand, "fax");
int umbraln = 80;
if (umbraln != 0)
MagickThresholdImage(m_wand, (double)umbraln*(QuantumRange/100));
else
MagickThresholdImage(m_wand, (double)-1);
MagickWriteImage(m_wand,"/dir/newPDF.pdf");
ClearMagickWand(m_wand);
If I do that with a multipage PDF, it only makes a new pdf with the last page converted. Any help?
Kind regards,
Isleo.
Isleo
Posts: 4 Joined: 2014-12-23T03:48:23-07:00
Authentication code: 6789
Post
by Isleo » 2014-12-30T04:08:10-07:00
Autoanswer: MagickWriteImages(m_wand, dir/newFile.pdf,MagickTrue);