I'm using ImageMagick to convert some PDF to files to PNG images, and I'm experiencing some quality problems because the generated image has very low quality. I played with the density, resample, interpolate and filter flags of the convert command, but I did not manage in having an high quality image like I would make a screenshot from a PDF reader (which preserve the vectorial quality of the PDF file, of course).

Could you help me, please?

migrated from stackoverflow.com Apr 3 '13 at 17:02

This question came from our site for professional and enthusiast programmers.

  • Have you tried the -size or -resize flag to specify a resolution? – Lars Kotthoff Apr 3 '13 at 15:33

As far as I know, Imagemagick will always rasterize your PDF, process the output raster image by applying whatever transformation you requested, then it will wrap the resulting raster image as PDF again and give you that as final result.

If you want the "vectorial features" of your PDF file to remain the same, then you should use ghostscript instead, which is what Imagemagick is using under the hoods anyways.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy