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

Commented Unassigned: Incorrect path for GhostScriptViewer [2266]

$
0
0
Using the sample of GhostScriptViewer i've noticed that there are some paths that make GhostScriptViewer throw a FormatException (because it's trying to cast a string as a page number, whereas the page number is the folllowing message : Unrecoverable erro : stackunderflow[...]

It' happen when using a path like :
C:\échanges\COMMDIS\PROD\Affaires\CPEN\CPEN140002 - EDF CIPN - PSPR\10 Suivi\40 Ecarts contract\Développements .NET\...

Yes I know, a lot of unexpected caracter...
Comments: ** Comment from web user: Crayjin **

flipnode's code makes the Ghostscript.NET viewer working for me, if I replace the method StringHelper.ToUtf8String(string value) with it.

```
public static string ToUtf8String(string value)
{
return System.Text.Encoding.Default.GetString(System.Text.Encoding.UTF8.GetBytes(value));
}
```

Then I can open a pdf file with the path "C:\Müller\Umlaute.pdf", although I don't know if it breaks anything else.


Viewing all articles
Browse latest Browse all 393

Trending Articles



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