ArtifexSoftware / Ghostscript.NET

Ghostscript.NET - managed wrapper around the Ghostscript library (32-bit & 64-bit)
https://ghostscript.com
GNU Affero General Public License v3.0
391 stars 152 forks source link

When calling GhostScript unhandle exception occurs #91

Open cschmitt2000 opened 3 years ago

cschmitt2000 commented 3 years ago

I'm running ghostscript.net with the following arguments -dCompatibilityLevel=1.4 -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -sPAPERSIZE=a4 -dFIXEDMEDIA -dPDFFitPage -dPDFSETTINGS=/printer -sFONTPATH=C:\WINDOWS\Fonts -sDEVICE=pdfwrite -sOutputFile=MYFILEHERE -fMYINPUTFILEHERE

On random files GhostScript.NET has an unhandled exception that shuts down the calling application, or even the NUnit test. In most cases the error seems to be after the last page has been processed. I have run the files directly with GhostScript 64 9.54.x and the file processed fine. The original rendering application varies on all PDF's that fail.

.NET 4.7.1 VS 2019 I wish I could give more information.

twooclock commented 2 years ago

Same happens to me with: -empty -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -sOutputFile=output.pdf -f ERRFILE.PDF

ERRFILE.PDF:ErrFile.pdf

Process dies after last page.

When using within IIS error code is iisexpress.exe' has exited with code -1073741784 (0xc0000028). which means "An invalid or unaligned stack was encountered during an unwind operation."