Ghostscript.NET (written in C#) is the most completed
managed wrapper library around the Ghostscript library (32-bit & 64-bit), an interpreter for the PostScript language, PDF, related software and documentation.
All other .NET Ghostscript wrappers that you can find on the internet this days does not allow you to render PDF page directly to the screen without exporting the pages to the disk first. This wrapper does not require exporting to the disk, it can render
PDF pages to the screen directly from the Ghostscript interpreter.
NuGet: PM> Install-Package Ghostscript.NET
Used in Ghostscript Studio (Ghostscript IDE)
Features of the Ghostscript.NET are:
- It contains GhostscriptViewer class which allows you to easily render and navigate through PDF or PostScript files on the screen via code. It can handle multi-page PostScript files.
- GhostscriptViewer class contains progressive display update implementation. While Ghostscript is drawing / rasterizing you can see tiles drawing on the screen. Custom update interval can be set.
- GhostscriptViewer class has Zoom-in and Zoom-out functionality.
- It contains GhostscriptRasterizer class which provides ability to easily export
PDF pages, PostScript pages and EPS
files to the System.Drawing.Image object in the memory.
- It allows you to run multiple instances of the Ghostscript library (dll) simultaneously within a single process (Ghostscript API does not support this out-of-the-box). This is achieved by using Microsoft.WinAny.Helper library
and it's DynamicNativeLibrary class which allows you to load a native library from the memory instead from a disk. By doing this (loading from the memory), all Ghostscript instances are running in their own context.
- It contains GhostscriptProcessor class which allows you to call Ghostscript library (dll) with a custom specified arguments / switches.
- All Ghostscript functions which provides ability to rasterize / render postscript or pdf directly to the screen without a need to save it to the disk first are implemented.
- It's completely compatible and tested with 32-bit and 64-bit Ghostscript library.
- Extending this library to be more "developer" friendly.
Sample applications screenshots below (built on the top of the Ghostscript.NET library):
Ghostscript.NET.Viewer: (supports viewing of PDF and multi-page PS files)
Example of direct postscript rasterizing via Ghostscript.NET.