Page 1 of 1

Multi-page PDF to PNG

Posted: 2017-02-02T10:29:56-07:00
by shamalamastreetman
I just installed ImageMagick because I need to convert a multi-page PDF into individual PNG files. Right now using GIMP of PS batch commands isn't doing the trick. I'm new to IM and I noticed that on windows, the convert command is for drive management. Is there a different exe windows users run for this?

I also would like to set the destination resolution, so after reading quite a few posts, I amg guessing that my parameters will be

something.exe -density 300 file.pdf -scale 825x1125 .\test\output-%d.png

would this be correct?

edit: just to add, I have installed ImageMagick-7.0.4-5-Q16-x64-dll.exe
and have run the test:
magick logo: logo.gif
magick identify logo.gif
magick display logo.gif
everything seems to be ok

Re: Multi-page PDF to PNG

Posted: 2017-02-02T10:36:25-07:00
by fmw42
try

Code: Select all

convert.exe -density 300 file.pdf -scale 825x1125 .\test\output-%d.png
But be sure you are using the IM convert.exe and not the Window convert.exe. Many IM Windows users rename the IM convert.exe to something like IMconvert.exe.

What is your IM version? If you are using IM 7, then change convert.exe to magick.exe

Re: Multi-page PDF to PNG

Posted: 2017-02-02T10:41:49-07:00
by shamalamastreetman
The only binaries that I have in the folder are:
dcraw.exe
ffmpeg.exe
hp2xx.exe
imdisplay.exe
magick.exe

I haven't renamed anything yet since I haven't seen a convert.exe but it did cross my mind to do that.

Re: Multi-page PDF to PNG

Posted: 2017-02-02T10:45:28-07:00
by snibgo
shamalamastreetman wrote:something.exe -density 300 file.pdf -scale 825x1125 .\test\output-%d.png
Yes. For "something.exe" use "magick". No need to rename anything.

For "-scale", you might prefer "-resize".

Re: Multi-page PDF to PNG

Posted: 2017-02-02T10:46:03-07:00
by shamalamastreetman
thanks for the super quick answers!

Re: Multi-page PDF to PNG

Posted: 2017-02-02T10:48:22-07:00
by fmw42
OK, You have IM 7, so

First try

Code: Select all

magick.exe -version
That will show you the version of IM and the delegate libraries to be sure you can process PDF, JPG, PNG, TIFF etc. Show me what you have.

Then try

Code: Select all

magick.exe -density 300 file.pdf -resize 825x1125 .\test\output-%d.png
-resize is better than -scale. The latter will do block averaging and be more blurry.


For new users, see the following references:
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/script/comma ... ptions.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/

For IM 7, in these documents, where it uses "convert", you should use "magick". If you need mogrify, montage, identify, etc, then use "magick.exe identify ...." etc. That is preface all the others with magick first.

Sorry, I am not a Windows user and so do not know much about Windows syntax.

See
http://www.imagemagick.org/Usage/windows/

For IM 7 vs IM 6, see
http://imagemagick.org/script/porting.php#cli