I am not sure why this is failing at var img = rasterizer.GetPage(dpi, 1);
with the following error:
Method not found: 'System.Drawing.Image Ghostscript.NET.Rasterizer.GhostscriptRasterizer.GetPage(Int32, Int32)'
My path to the dll is correct and the 64-bit version. The GhostScript Rasterizer can open the memory stream and then fails on GetPage()
. It bombs out the debugger without hitting a breakpoint if I have that line uncommented.
Here is the code:
var dpi = 90;
GhostscriptVersionInfo gvi = new GhostscriptVersionInfo(new Version(0, 0, 0), workingDirectory + @"\gsdll64.dll", string.Empty, GhostscriptLicense.GPL);
using (var rasterizer = new GhostscriptRasterizer())
{
rasterizer.Open(ms, gvi, false);
if (rasterizer.PageCount > 0)
{
var img = rasterizer.GetPage(dpi, 1);