ghostscipt Native Code works with Console App but not with mvc webapp

267 Views Asked by At

I am working of a PDF to image converstion. I found ghostscriptsharp which is a c# wrapper written for ghostscript. I used it and developed my application. Most thing if not all worked fine when i was testing with my console application.

After I integrated it into the webapp It just would not work. A quick search on the internet pointed me towards permission issues and framework incompatibility. but i have ruled them out.

gs32dll (ghostscript dll) is there in my webapplications bin folder. so no problems there either.

The webapplication is one project (webappLive) ghostscriptsharp is also a seperate project (GhostscriptSharp) - this has all the DLLImport and stuff one project will consume the GhostscriptSharp (GHInterface) - just calls the GhostscriptSharp

Any help suggestions will be appreciated.

P.S.: I have gone through all posts that has ghostscriptsharp tagged on SO, none of them came of any help

Adding Code:

try{
int result = InitAPI(gsInstancePtr, args.Length, args);
if (result < 0)
{
 throw new ExternalException("Ghostscript conversion error", result);
}    }

the result get a -100 (as per ghostscript that means fatal error)

0

There are 0 best solutions below