Page 1 of 1

PDF to PNG conversion

Posted: 2012-11-26T13:47:42-07:00
by ac3raven
When I use the PrtSc key to take a screenshot of a pdf page and then I paste it into Gimp, it looks good. But when I use IM to extract a page and save it as a png, it looks bad, as though all the antialiasing is gone and everything is smaller and more difficult to read.

I'm trying to use IM to replicate the result I get from PrtSc because I need IM for some batch processing. I'm new to IM, by the way. I have a feeling it has something to do with PDF being a vector format and IMs limitations when it comes to converting vector to bitmap.

I'm just using the regular -convert command to do this. Help?

What I need from IM:
Image

What I'm getting:
Image

Re: PDF to PNG conversion

Posted: 2012-11-26T14:40:14-07:00
by fmw42
Use supersampling:

convert -density 288 image.pdf -resize 25% image.png

normal density is 72. So 72*4=288 enlarges the pdf and then resize by 1/4=25% to get back to normal size. It will take longer but the quality will be much better.