This project has moved and is read-only. For the latest updates, please go here.

PDF->PNG conversion failing

May 30, 2013 at 2:30 PM
I have a simple app that converts a few thousand PDF files to images. When I run a process using the imagemagick installed on my machine, everything is fine. When I try to use I get the following error:

Unhandled Exception: ImageMagick.MagickDelegateErrorException: mmlToPDF.exe: PostscriptDelegateFailed `C:\Users...\Desktop\img\eqn_.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/682
at ImageMagick.MagickReader.Read(Image* image, String fileName, MagickReadSettings readSettings)
at ImageMagick.MagickImage..ctor(String fileName)

Which looks very much like the common GhostScript installation error. I do however have GS 9.0.7 installed, so is there a particular version of GS I should be using or some initialization required for GS through

Alternatively, can anyone tell what am I doing wrong here.
(Initialize() has been called earlier, intFiles is List<string> containing the PDF file names)

foreach (string pdfFile in intFiles)
string imgFile = Path.ChangeExtension(pdfFile, imgType);
MagickImage img = new MagickImage(pdfFile);
img.Density = new MagickGeometry(300, 300);
img.Quality = 100;
May 31, 2013 at 9:09 AM
Take a look at the url below and see if that helps you:
Jun 1, 2013 at 4:26 PM
Edited Jun 1, 2013 at 6:19 PM
Thanks for reminding me to post something about the GhostScript issues. I added a wiki page that explains which version of GhostScript you should install and how you can convert a PDF to an image here:
Jun 3, 2013 at 8:23 AM
@petersunde - Thanks for the pointer and @dlemestra for the wiki page.
Spot on, the problem was a 64 bit version of GhostScript.