Is there a software that could convert a multi-page PDF file to PNG files, and could automatically save one PNG file per page of the PDF document (for Windows 7)?

I have tried a few virtual printer driver software and image editing software to convert PDF files to PNG but I could only save one PNG file per PDF document.

link|improve this question

77% accept rate
Using Linux this is quite straightforward, with "pdf2ppm" to convert pdf to ppm and then "convert" (from imagemagick) to split ppm file to png files. – Olli Feb 9 '11 at 8:51
Using Mac OS X this is quite straightforward, with Automator and the "Render PDF Pages as Images" action, which converts a multi-page PDF to separate image files. – Daniel Beck Feb 9 '11 at 9:06
1  
@Olli There is no need for two steps. See my answer below. – frabjous Feb 9 '11 at 18:47
feedback

2 Answers

up vote 1 down vote accepted

Use Ghostscript

-sOutputFile=filename This is a general option telling Ghostscript what to name the output. It can either be a single filename 'tiger.png' or a template 'figure-%03d.jpg' where the %03d is replaced by the page number.

You may find it convenient to use GhostView, the GUI front end.

link|improve this answer
I experimented on a couple of options for GhostView and came to this group of options to automatically convert the PDF to PNGs without user prompts: -dBATCH -dNOPAUSE -sDEVICE=png16m -r96 -sOutputFile="C:\directory_Output\%03d.png" "C:\directory_Input\pdfname.pdf" Am I doing it right? I also would like to know what DPI I should set it to (I set it to 96 in this case) to have the same resolution as the source PDF. (The PDF files I am converting contains scanned images of a book or magazine, and does not have OCR text/information.) – galacticninja Feb 11 '11 at 7:21
If the source DPI is 96 and the image is likely to be mostly viewed on screen, 96 is a good choice for the output DPI, since that is the default display-DPI for MS Windows (though a few will set their display-DPI to 120). – RedGrittyBrick Feb 11 '11 at 9:54
feedback

Using ImageMagick (you'll need Ghostscript installed as well), the command:

convert -density 300 filename.pdf filename.png

will result in a series of files filename-0.png, filename-1.png, filename-2.png, one for each of the pages of the PDF. You'll want to play around with the density setting to get a resolution you like.

You may need to give the full path to convert.exe on Windows; I've only ever done this on Linux, but it should work for Windows too.

link|improve this answer
I've been trying the Ghostscript method in the other answer above, but would now like to try this method you suggested. I'd like to ask if the -density 300 argument means that the DPI setting is 300, or does it mean another thing? – galacticninja Aug 18 '11 at 6:58
Yes, see here. – frabjous Aug 18 '11 at 13:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.