All formats

EPS libraries

Rendering EPS means running PostScript, so every library that reads EPS uses Ghostscript underneath. Ghostscript is AGPL-3.0 (or commercial from Artifex); check the license before shipping it or running it in a service. Libraries that only write EPS (cairo, xmlgraphics-commons, canvas, gonum/plot, matplotlib) don’t need it.

Language Library Read Write Notes
C/C++ Ghostscript yes yes render with -dEPSCrop, compute the bounding box, write with eps2write. AGPL
C/C++ libspectre yes no DSC metadata and rendering for viewers, on top of Ghostscript. GPL-2.0
C/C++ cairo no yes vector drawing to EPS with cairo_ps_surface_set_eps
C# Magick.NET yes yes rasterize EPS through Ghostscript, write raster EPS
C# Ghostscript.NET yes yes Ghostscript wrapper with EPS clipping. AGPL
Java xmlgraphics-commons DSC only yes Java2D to EPS, bounding box from DSC comments
Go gonum/plot no yes plots and charts saved as EPS
Go canvas no yes pure Go vector graphics with an EPS renderer
Python Pillow yes yes rasterize EPS through Ghostscript, read binary-header EPS
Python Matplotlib no yes charts saved as EPS
Python pycairo no yes cairo bindings, PSSurface.set_eps(True)
Ruby MiniMagick yes yes ImageMagick command line from Ruby
Rust cairo-rs no yes gtk-rs cairo bindings, PsSurface::set_eps
PHP Imagick yes yes ImageMagick extension; reads EPS through Ghostscript

To read only the bounding box or the preview of an EPS file you don’t need Ghostscript: the %%BoundingBox line and the 30-byte binary header are simple to parse yourself (see EPS file structure).

By language#