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 Magick.net 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 Magick.net?
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;
img.Trim();
img.Write(imgFile);
}
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 Magick.net?
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;
img.Trim();
img.Write(imgFile);
}