Tuesday, July 26, 2011

Convert PDF to image using command line

To convert a PDF file to a series of images, you will need Imagemagick installed on your system. If you run Linux or Mac OS X, it is probably already installed. For Windows, iOS and other OSes, you can download a binary release here. If that fails, you can download the source and try compiling Imagemagick yourself.

To convert the PDF file to a series of image, you use the convert utility as follows:
convert -quality 100 -density 600x600 orig.pdf output%d.jpg

To convert to any other format simply replace the 'jpg' extension with the desired output format.

3 comments:

rahulshukla said...

the conversion could not be completed....cmd prompt shows an error :
Magick : missing an image filename 'filename.jpg'....

rr said...

The command as shown works for me. Maybe something is wrong with your pdf file?

buyi wen said...

I'm not a developer, i always use this free online pdf to image converter