I found these posts on converting a PDF to JPG using ImageMagick. However, I have a 12 page PDF I want to convert into 12 separate high quality jpg files.
Looking for the least tedious way possible.
Thanks.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI would recommend GhostScript:
gs -sDEVICE=jpeg -r300x300 -dNOPAUSE -dBATCH -sOutputFile="image00.jpg" "input.pdf"
r
parameter is resolution
gs -sDEVICE=jpeggray -r300x300 -dNOPAUSE -dBATCH -sOutputFile="image00.jpg" "input.pdf"
This one is for grayscale output.
-rnumber1xnumber2
option is kind of irrelevant for a jpg right? I could just use -r72 for 72dpi or -r150 for 150dpi right?
– SteveLambert
Jun 24 '14 at 22:56
Another option would be sejda-console (requires Java):
sejda-console pdftojpeg --files input.pdf --resolution 300 --output /outputdirectory
Full documentation:
Usage: sejda-console pdftojpeg options
--files -f value... : pdf file to operate on: a single pdf file (EX. -f /tmp/file1.pdf or -f /tmp/password_protected_file2.pdf:secret123) (required)
[--help -h] : prints usage information. Can be used to detail options for a command '-h command' (optional)
--output -o value : output directory (required)
--outputPrefix -p value : prefix for the output files name (optional)
[--overwrite] : overwrite existing output file (optional)
[--resolution -r value] : resolution in dpi. Default is 72 (optional)
[--userZoom -z value] : zoom factor for the generated images (EX. 1.5 generates images with a 150% zoom factor). (optional)
If you just want to quickly convert a single file and privacy is not a concern you can always use their web app instead.
If you have a Mac this is very easy to do using Automator. You just need three actions:
Ask for finder items Render PDF pages as images Move finder items You can even select the color model, format (12 available), resolution and compression quality. Just to test it out, I converted a PDF file I have here with 207 pages:
Using "600dpi/RGB/best quality possible" it took an hour to convert to JPEG. Using "300dpi/RGB/60% quality" it took about 5 minutes to convert to JPEG. (My laptop have a Core 2 Duo 2.26Ghz)