All formats

PostScript libraries

Reading PostScript means running it, and almost every library that reads PostScript uses Ghostscript to do it. Ghostscript is licensed under the AGPL-3.0 (or a commercial license from Artifex): if you ship it inside a closed-source program or run it in a network service, check the license first. Libraries that only write PostScript (cairo, xmlgraphics-commons, canvas) don’t need Ghostscript.

Language Library Read Write Notes
C/C++ Ghostscript yes yes the interpreter; render, convert to PDF, extract text. AGPL
C/C++ libspectre yes no small API over Ghostscript for viewers: pages, DSC metadata, render to RGB. GPL-2.0
C/C++ cairo no yes 2D graphics library with a PostScript output surface
C# Ghostscript.NET yes yes Ghostscript wrapper: rasterize pages, run any Ghostscript command. AGPL
C# Magick.NET yes yes ImageMagick for .NET; reads PS through Ghostscript, writes raster PS
Java xmlgraphics-commons DSC only yes Java2D to PostScript, DSC parser (no interpreter)
Go canvas no yes pure Go vector graphics with a PostScript renderer
Python python-ghostscript yes yes ctypes binding of the Ghostscript C API. GPL-3.0
Python Pillow yes yes rasterizes PS through Ghostscript; PSDraw writes simple PS
Python pycairo no yes cairo bindings, PSSurface
Ruby MiniMagick yes yes ImageMagick command line from Ruby
Rust cairo-rs no yes gtk-rs cairo bindings, PsSurface
PHP Imagick yes yes ImageMagick extension; reads PS through Ghostscript

There is no maintained pure Java, Go, Rust or .NET PostScript interpreter. Ghost4J wraps Ghostscript for Java but has had no release since 2016.

By language#