Page 1 of 1

convert PDF to image: smooth text

Posted: 2007-03-02T11:18:17-07:00
by Yulia
Hi All

I'm trying to convert PDF file to image (jpeg, gif).
Well, the text is a little 'smooth'

original pdf
http://www.inwebdev.com/files/s.pdf

result jpg
http://www.inwebdev.com/files/s1.jpg

I have tryed some commands:

convert -geometry 792x986 -density 96x96 -extract 736X980+48+48 -transparent white -depth 8 s.pdf[0] s1.jpg

convert -density 200x200 -scale 850x11100 s.pdf[0] s1.jpg

convert -density 200x200 -scale 850x11100 s.pdf[0] s1.jpg

geometry 792x986 -density 200x200 -extract 736X980+48+48 s.pdf[0] s1.jpg

convert -scale 850x1100 s.pdf[0] s1.jpg

convert -density 96x96 -scale 850x11100 s.pdf[0] s1.jpg

The result is the same: with 'smooth' text :(

Thanks in advance for any help!

Re: convert PDF to image: smooth text

Posted: 2007-03-04T18:46:33-07:00
by anthony
Increase the density BEFORE reading the postscript, then -resize the result by a simular amount afterwards (or use -resample to also fix the density resolution).

see IM examples postscript text handling
http://www.imagemagick.org/Usage/text/#postscript

Remember do NOT use -scale (which does not smooth images) and do the -resize AFTER reading in the image as IM is a 'do it in the order given' processor.

Re: convert PDF to image: smooth text

Posted: 2007-03-05T04:52:14-07:00
by Yulia
Anthony, great thanks! :)

This command gives the perfect result:

convert.exe -density 196 s.pdf[0] s.jpg