Quality PDF to PNG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mtdimich

Quality PDF to PNG

Post by mtdimich »

I'm using IM to convert PDF's to PNG's. I was formerly using GhostScript to do this, but because of a requirement/bug in MSSQL , I need a type 3 PNG. When I do this conversion, the smaller text gets pretty blurry. Are there some parameters where I can optimize this so I get better quality and can read the text after it has been converted? I'm not too familiar with Antialiasing but I tried using that but I don't know enough to use it correctly I fear. Here are some of the commands I've used. Q16 by the way.

convert testpdf.pdf -colors 255 -antialias Image.PNG
convert testpdf.pdf -antialias Image.PNG
convert testpdf.pdf +antialias Image.PNG

Thanks in advance!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Try this command to generate reasonable looking PDF renderings:
  • convert -density 400x400 testpdf.pdf -resize 25% image.png
mtdimich

Post by mtdimich »

Do you need to convert to a TIFF? I used a PNG and the quality is good enough to read I would say about size 6 font.
mtdimich

Post by mtdimich »

magick wrote: Try this command to generate reasonable looking PDF renderings:
  • convert -density 400x400 testpdf.pdf -resize 25% image.png



This actually rendered a slightly blurry pdf. I get better results when I do not resize the pdf. What can antialiasing do for the quality of text in this png?

I'm guessing there is a pretty direct correlation between size of the png and quality. When I increase the dpi, the file obviously gets better quality, but the size of the file increases quickly. Any tricks to keeping the size of the file down but being able have the smaller text in the pdf that I'm trying to convert to a png readable and crisp?

Thanks!
Matt
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

You can increase sharpness with the -support option. Otherwise to get sharper text, prodvide commercial quality fonts to Ghostscript.
Post Reply