An error occured when call to 'gsapi_new_instance' is made

Here you can find everything you need to know about Dll-Files. You can also share your knowledge regarding the topic.

Moderators: DllAdmin, DLLADMIN ONLY

An error occured when call to 'gsapi_new_instance' is made

Postby amitlal » 25 Apr 2019, 07:50

I am trying to use GhostscriptRasterizer to create image of PDF files uploaded.

For this I am making my code async to avoid delay to enduser and complete the fileupload and image generation using threadpool. But this is only working if I am uploading single file.

When ever I try to upload more than one PDF file it gives me error in the method call "rasterizer.Open(input, version, false);"

And the error message displayed is
1. "An error occured when call to 'gsapi_new_instance' is made: -100".

2. Delegate of an exported function couldn't be created for symbol 'gsapi_revision' (Error in different machine)

I have provided the code I am using below and I am using 32bit dll.

Please provide me immediate solution for this. And if GhostscriptRasterizer supports multithreading?

Codeset
private void PdfToImage(string input, string imgFolderPath, int dpi)
{
var path = AssemblyDirectory;

Ghostscript.NET.Rasterizer.GhostscriptRasterizer rasterizer;
var version = new GhostscriptVersionInfo(new Version(0, 0, 0), path + @"\gsdll32.dll", string.Empty, GhostscriptLicense.GPL);

using (rasterizer = new Ghostscript.NET.Rasterizer.GhostscriptRasterizer())
{

rasterizer.Open(input, version, false);
var pageFilePath = Path.Combine(imgFolderPath, string.Concat(Path.GetFileNameWithoutExtension(input), ".jpg"));
var img = rasterizer.GetPage(dpi, dpi, 1);
img.Save(pageFilePath, ImageFormat.Jpeg);
rasterizer.Close();
}
}
amitlal
 
Posts: 3
Joined: 25 Apr 2019, 07:36

Re: An error occured when call to 'gsapi_new_instance' is ma

Postby DllAdmin » 25 Apr 2019, 09:23

Hello amitlal,

I can not tell if the gsdll32.dll available at https://www.dll-files.com/gsdll32.dll.html supports multithreading.

Perhaps you need a different version of gsdll32.dll .

Perhaps you can find different versions, and support, at https://www.ghostscript.com/download.html

Best regards
Erik
DLL-Files.com
DllAdmin
Site Admin
 
Posts: 349
Joined: 17 Mar 2011, 12:32

Re: An error occured when call to 'gsapi_new_instance' is ma

Postby DllAdmin » 25 Apr 2019, 10:11

gsdll32.dll v9.27 is now available for download in CLIENT and from https://www.dll-files.com/gsdll32.dll.html
DllAdmin
Site Admin
 
Posts: 349
Joined: 17 Mar 2011, 12:32

Re: An error occured when call to 'gsapi_new_instance' is ma

Postby amitlal » 25 Apr 2019, 10:37

Can you please let me know the creator of gsdll32.dll. I mean the contact information to know if it supports multithreading.
amitlal
 
Posts: 3
Joined: 25 Apr 2019, 07:36

Re: An error occured when call to 'gsapi_new_instance' is ma

Postby DllAdmin » 25 Apr 2019, 10:50

DllAdmin
Site Admin
 
Posts: 349
Joined: 17 Mar 2011, 12:32

Re: An error occured when call to 'gsapi_new_instance' is ma

Postby amitlal » 26 Apr 2019, 07:57

Thanks admin for your time and support
amitlal
 
Posts: 3
Joined: 25 Apr 2019, 07:36


Return to Everything about Dll-Files

Who is online

Users browsing this forum: No registered users and 7 guests