Search code examples
c#pdfghostscriptghostscript.netghostscriptsharp

GhostScript Path output/input error


I'm using GS 32bits with the wrapper for C# .

This line works :

GhostscriptSharp.GhostscriptWrapper.GeneratePageThumb("a.pdf" , "a.jpg", 1, 100, 100, 50, 50);

But this line doesn't work

GhostscriptSharp.GhostscriptWrapper.GeneratePageThumb("a.pdf" , "C:\\a.jpg", 1, 100, 100, 50, 50);

How GS handle the in/out path ?


Solution

  • Absolute paths are a bit problematic. I've solved my problem by using relative paths.

    GhostscriptSharp.GhostscriptWrapper.GeneratePageThumb("a.pdf" , "thumbs/a.jpg", 1, 100, 100, 50, 50);