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();
}
}
An error occured when call to 'gsapi_new_instance' is made
Moderators: DllAdmin, DLLADMIN ONLY
Re: An error occured when call to 'gsapi_new_instance' is ma
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
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
Re: An error occured when call to 'gsapi_new_instance' is ma
gsdll32.dll v9.27 is now available for download in CLIENT and from https://www.dll-files.com/gsdll32.dll.html
Re: An error occured when call to 'gsapi_new_instance' is ma
Can you please let me know the creator of gsdll32.dll. I mean the contact information to know if it supports multithreading.
Re: An error occured when call to 'gsapi_new_instance' is ma
Thanks admin for your time and support