PDA

View Full Version : Using Ghostscript to convert pdf to jpg



TheOlster
21st July 2006, 10:08 PM
Hi - I've need to convert a large pdf into lots of jpg images, and I understand that I need to use ghostscript to do this.

I need to be able to set the resolution of the images, and do the whole thing at the command line. Can anyone help with this?

Thanks!

TheOlster
22nd July 2006, 11:20 AM
FYI - I found one solution for png's (jpgs were very poor quality):

gs -dSAFER -dBATCH -dNOPAUSE -r150 -sDEVICE=png16m -dTextAlphaBits=4 -sOutputFile=page-%02d.png mydoc.pdf

jobjol
24th July 2012, 07:45 PM
Hi, i use the following command for my online PDF to JPG conversion site, which give you a very high quality JPG image:


gs -q -dQuiet -dSAFER -dBATCH -dNOPAUSE -dNOPROMT -dMaxBitmap=500000000 -dAlignToPixels=0 dGridFitTT=2 -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300x300 -dFirstPage=1 -dLastPage=[last-page-number] -sOutputFile=[output-file] -f[input-file]

---------- Post added at 06:45 PM ---------- Previous post was at 01:24 PM ----------

You can check the output quality of the command above @ pdfjpg.net (http://pdfjpg.net)