C# Ghostscript Wrapper
Asked Answered
L

3

5

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

Leoine answered 2/9, 2009 at 19:35 Comment(0)
K
0

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.

Krystakrystal answered 2/9, 2009 at 21:43 Comment(2)
I can not find such namespace in pdfsharp, not even in the repository at the moment of post.Khedive
@Razvan, if you need Ghostscript wrapper, take a look at: ghostscriptnet.codeplex.comUrogenous
P
14

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/

Priddy answered 30/11, 2010 at 20:44 Comment(1)
Old question/answer, but still relevant: As-is the GhostscriptSharp wrapper only provides access to a couple of functions for generating thumbnails from PDFs. It would not cover the question asked here, which was "converting postscript to a PDF", without adding code to it.Uchish
K
0

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.

Krystakrystal answered 2/9, 2009 at 21:43 Comment(2)
I can not find such namespace in pdfsharp, not even in the repository at the moment of post.Khedive
@Razvan, if you need Ghostscript wrapper, take a look at: ghostscriptnet.codeplex.comUrogenous
L
0

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.

Lanark answered 3/9, 2014 at 13:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.