EPS libraries for C/C++
- Ghostscript renders EPS to PNG or PDF cropped to the bounding box (
-dEPSCrop), computes the real bounding box with thebboxdevice and converts PDF or PostScript pages to EPS witheps2write. AGPL-3.0 or commercial. - libspectre reads DSC metadata (is it EPS, bounding box size, creator) and renders the graphic into an RGB buffer through Ghostscript. GPL-2.0.
- cairo writes EPS from vector drawing calls; the bounding box is computed from what you draw. LGPL-2.1 or MPL-1.1.
Pick Ghostscript for conversion jobs, libspectre for a viewer or thumbnailer, cairo to produce EPS.
- cairo cairo is a 2D graphics library for C that writes Encapsulated PostScript. How to create an EPS file with a tight bounding box, add text and shapes.
- Ghostscript Use the Ghostscript C API to render EPS to PNG, convert EPS to PDF cropped to the bounding box, compute the real bounding box.
- libspectre libspectre is a C library over Ghostscript for PostScript and EPS viewers. How to detect an EPS file, read its size and metadata.