BTW, one of the reasons ImageMagick is so much slower is that it calls Ghostscript twice. It does not convert PDF => PNG in one go, but uses 2 different steps:
- it first uses Ghostscript for
PDF => PostScript conversion;
- it then uses Ghostscript for
PostScript => PNG conversion.
You can learn about the detailed settings ImageMagick's "delegates" (the external programs ImageMagick uses, such as Ghostscript) by typing
convert -list delegate
(On my system that's a list of 32 different commands.) Now to see which commands are used to convert to PNG, use this:
convert -list delegate | grep -i png
Ok, this was for Linux. If you are on Windows, try this:
convert -list delegate | findstr /i png
You'll discover that IM does produce PNG only from PS or EPS input. So how does IM get (E)PS from your PDF? Easy:
convert -list delegate | findstr /i PDF
convert -list delegate | grep -i PDF
Ah! It uses Ghostscript to make a PDF => PS conversion, then uses Ghostscript again to make a PS => PNG conversion. Works, but isn't the most efficient way if you know that Ghostscript can do PDF => PNG in one go. And faster. And in much better quality.
About IM's handling of PDF conversion to images via the Ghostscript delegate you should know two things first and foremost:
- By default, if you don't give an extra parameter, Ghostscript will output images with a 72dpi resolution. That's why sometimes people here suggest to add
-density 600 as a
convert parameter which tells Ghostscript to use a 600 dpi resolution for its image output.
- The detour of IM to call Ghostscript twice to convert first
PDF => PS and then
PS => PNG is a real blunder. Because you never win and harldy keep quality in the first step, but very often loose some. Reasons:
- PDF can handle transparencies, which PostScript can not.
- PDF can embed TrueType fonts, which PostScript can not. etc.pp.
(Conversion in the opposite direction,
PS => PDF, therefor is not that critical....)
That's why I'd suggested you convert your PDFs in one go to PNG (or JPEG) using Ghostscript directly. And use the most recent version 8.71 (soon to be released: 9.00) of Ghostscript...