Index List

19 September 2008

Convert PDF Document Into a JPEG Image

If you want to convert your pdf document into a jpeg image, it is possible to use pdftoppm and after ppmtojpeg.

First, choose your pdf document and use:

ppm file.pdf file

You will have one ppm image per pdf page. If you want only part of the document use -f int1 -l int2, int1 is the initial page and int2 is the final page.

Use the script to convert all ppm images into jpeg images:

for file in *.ppm; do ppmtojpeg $file > ${file/.ppm/.jpg}; rm $file; done

And thats it. You will have your pdf document into jpeg images.