ArtifexSoftware / Ghostscript.NET

Ghostscript.NET - managed wrapper around the Ghostscript library (32-bit & 64-bit). Tested with Ghostscript versions < 10.
https://ghostscript.com
GNU Affero General Public License v3.0
404 stars 155 forks source link

Not working with 64bit version of Ghostscript #65

Closed donnyv closed 3 years ago

donnyv commented 5 years ago

I installed Ghostscript version 9.27 (64bit) and ran this code and nothing seems to happen. It doesn't throw an exception but it doesn't produce a tiff file either. I tried installing the 32 bit version and than it works fine.

var inputFile = @"W:\Development\Good Files\0901_003.pdf";
var outputFile = @"C:\Temp\test.tif";
GhostscriptVersionInfo gv = GhostscriptVersionInfo.GetLastInstalledVersion();
using (GhostscriptProcessor processor = new GhostscriptProcessor(gv, true))
{
    List<string> switches = new List<string>();
    switches.Add("-dBATCH");
    switches.Add("-dNOPAUSE");
    switches.Add("-sDEVICE=tiffg4");
    switches.Add(@"-sOutputFile=" + outputFile);
    switches.Add(inputFile);

    processor.StartProcessing(switches.ToArray(), null);
}
jhabjan commented 3 years ago

Fixed in today's v.1.2.2. release.