Page 1 of 1
Converting pdf to jpg
Posted: 2007-09-08T06:24:58-07:00
by elcorazon
Is there a way of setting the resolution of the pdf file you are converting when convert calls gs? It appears that convert (or gs) is down sampling a pdf file to 72dpi before converting it to a jpg, causing alot of aliasing in the text. I used the -quality 100 but it doesn't seem to be having any effect on the jpg.
I manually did it using photoshop, pulled in the pdf, resized to 72dpi and same height as the one that convert made and saved it as a jpg of only 80 quality and the aliasing is almost non-existant so I know it can be done, just how with convert?
Re: Converting pdf to jpg
Posted: 2007-09-10T20:30:41-07:00
by anthony
-density...
See IM Examples, Postscript/PDF images
http://www.imagemagick.org/Usage/text/#postscript
PDF and PS are handled in basically the same way.
WARNING see
A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector
Re: Converting pdf to jpg
Posted: 2007-09-17T09:27:39-07:00
by elcorazon
Anthony thanks. But I am still having issues trying to get the quality right. Here is what I have, maybe you can give me the best settings:
I have to convert 3 different single page pdf file sizes:
5 1/2" x 8 1/2"
6" x 9"
8 1/2" x 11"
so that the text is readable at at 72dpi with a width of 300 pixels.
Bill H
Editted with more information
I am using:
convert -density 196 pdffile.pdf -resample 72 imagefile.jpg
and getting final sizes (width x height):
5 1/2 x 8 1/2 = 396 x 612
6 x 9 = 432 x 648
8 1/2 x 11 = 612 x 792
I need to get these images to the same width (can go as high as 375 pixels wide) so they will display correctly in a flash animation and still be relatively readable.
Re: Converting pdf to jpg
Posted: 2007-09-18T00:38:30-07:00
by anthony
If you want a specific width... just resize the image to that width...
Then just set the output density
You can NOT get set resolution to be correct for a image, and have a specific
width (unless you crop which you don't want). that are antithesis of each other.