Quantcast
Channel: Ghostscript.NET
Viewing all articles
Browse latest Browse all 393

Created Unassigned: GhostscriptRasterizer process dies if feed a bad pdf regardless of try catch [2314]

$
0
0
```
using (var rar = new GhostscriptRasterizer())
{
try
{
//WARNING: this process will fail if its not a real pdf or the pdf is corrupt.
rar.Open(filePath, GetInstalledVersions(GhostscriptLicense.GPL).SingleOrDefault(), true);
var count = rar.PageCount;
//WARNING: this process will fail if its not a real pdf or the pdf is corrupt.
```

I have the above code in a try catch and it still kills the process for my application.

Why does the GhostScript process not just throw an exception, but instead just dies and my try catch is pointless with this.

Viewing all articles
Browse latest Browse all 393

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>