Question

Has anyone encountered a nice wrapper for GhostScript in C#. My specific use is to take postscript and turn it into a pdf

Was it helpful?

Solution

Open-source PDFSharp has a namespace for using GhostScript. Even if you can't directly use it, you can probably graft whatever you need out of the source.

OTHER TIPS

Matthew Ephraim has created a pretty simple C# wrapper called GhostScriptSharp that uses P/Invoke to access the unmanaged Ghostscript DLL in your C# application:

http://mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/

For completeness, there's also Gouda Ghostscript wrapper. You can also perform some ghostscript operations indirectly through imagemagick/graphicsmagick (they delegate to GS), so using a .NET library like GraphicsMagick.NET might be a good approach for you.

EDIT:

I just stumbled upon Ghostscript.NET as well. It claims to be

...the most completed managed wrapper library around the native Ghostscript library (32-bit & 64-bit), an interpreter for the PostScript language, PDF, related software and documentation

and among other features, allows you to run multiple Ghostscript instances simultaneously within a single process.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top