Open
Description
Good morning,
I have a file which opens perfectly under Ghostscript (10.02.1) which displays the two contained pages.
But the code below (using your library with gsdll64.dll and gsdll32.dll) produces an error which completely stops execution (even under Visual Studio, the software closes without any possibility of debugging, and no exception are provided !!!).
The hard stop happens in the line image = rasterizer.GetPage(DPI, pageNumber); on the second page.
I would like to provide you with the file by private message for debugging.
Image image = null;
try
{
using (var rasterizer = new GhostscriptRasterizer())
{
using (var stream = File.Open(FilenameToTest, FileMode.Open,FileAccess.Read,FileShare.ReadWrite))
{
rasterizer.Open(stream, _gs_verssion_info, true);
if (rasterizer.PageCount == 0)
throw new Exception("No Page");
for (int pageNumber = 1; pageNumber <= rasterizer.PageCount; pageNumber++)
{
image = rasterizer.GetPage(DPI, pageNumber);
if (image.Width == 0)
throw new Exception("No Image");
}
rasterizer.Close();
stream.Close();
stream.Dispose();
}
}
}
catch (Exception ex)
{
Debugger.Break();
}
Metadata
Metadata
Assignees
Labels
No labels