Closed joro01 closed 3 years ago
I just tried that and I can't reproduce the problem. Can you try to run your Visual Studio as Administrator and then try it again?
Hi! I'm experiencing the same issue trying to open the rasterizer in a 32 bit .net MVC application. I have installed the Ghostscript.net 1.2.2 package, installed Ghostscript 9.53.3 and copied the gsdll32.dll file to the bin folder. Running Visual Studio 2019 as Administrator.
{
var dllPath = @"C:\Website\bin\gsdll32.dll";
rasterizer.Open(physicalFilePath, new GhostscriptVersionInfo(dllPath), false);
var image = rasterizer.GetPage(96, pageNumber);
}
UPDATE:
Got it working by downgrading Ghostscript to 9.26.
I just tried that and I can't reproduce the problem. Can you try to run your Visual Studio as Administrator and then try it again?
I was having the same issue. Running VS as Administrator did not resolve the issue. I did try as @micke911 suggested by downgrading to 9.26 and it did resolve my issue as well.. @jhabjan what version were you testing in? I was getting this error with 9.53.3 32 bit version of GhostScript.
I just found and fixed this problem earlier today. The changes will be push shortly and I'll publish new dll.
v.1.2.3 that fixes this problem is now rolled out on Github and NuGet. Give it a go and please let me know if this is sorted out now.
Hi, I am afraid but it still doesn't work. Even if I start my VS as admin, it does not work. I do not have Ghostscript installed on my machine. I just use the assembly . Can this be a problem?
@joro01 , just to be clear, you tried Ghostscript.NET v.1.2.3 together with Ghostscript 9.53.3?
Tried Ghostscript.NET v.1.2.3 with Ghostscript 9.53.3 and the exception is not thrown. Problem solved for me!
I'm glad this resolved your issue @micke911
Hi, I've tried to convert a PDF to an image and get the following error:
Ghostscript.NET.GhostscriptAPICallException: 'An error occured when call to 'gsapi_new_instance' is made: -100'
I've used you sample code for my implementation. I have not installed Ghostscript on my Computer, I add the gsdll64.dll manually. The Application is a 64bit application, so the assembly 'gs64dll.dll' must be correct .
Can you please help me? Do I have to init an Interpreter first or something like that?