Skip to main content

eps2svg

Python 3.10+ License: MIT Dependencies: 1 PRs Welcome

Convert Adobe Illustrator EPS files to SVG with real, native gradients — no rasterisation, correct CMYK colours, and clean clip structures.

eps2svg is built for the practical, repeatable task of turning print-ready logo EPS files into future-proof SVG assets for web and app use.

Goal: small, readable SVG code with exact linearGradient definitions and colour values you can trust.

Deutsch / German version


Why this tool exists

Existing converters like pstoedit, pdf2svg, or the built-in SVG export from many graphics programs are unreliable precisely where it matters most. The three recurring failure points are:

  1. Clipping masks vs. gradients
    Many tools lose the correct nesting order or produce placement errors for masks. eps2svg faithfully reproduces the logical hierarchy in SVG.

  2. Gradient stops lie
    Adobe generates gradients with flat areas and non-linear ramps (stitching functions). Many converters incorrectly collapse these to just two stops or raster the gradient entirely. eps2svg uses a robust reduction (Douglas-Peucker) that respects flat zones and sharp knees.

  3. CMYK→RGB conversion is wrong
    Brand colours are often defined in CMYK, but converting them correctly requires colour management. A naive formula distorts them visibly. eps2svg asks Ghostscript itself for the conversion, matching what Acrobat and professional tools display.

This was not designed as a universal EPS parser, but as a practical, predictable tool that gets the common real-world case right.

What is supported

  • Adobe Illustrator EPS (Language Level 2) converted via Ghostscript PDF output
  • Basic vector structures:
    • Paths, fill colours (RGB, Greyscale, CMYK approximation)
    • Native linearGradient (direct mapping in SVG)
    • Clipping masks and path clipping
  • Bounding box via HiResBoundingBox → SVG viewBox

What is not (clearly and honestly)

  • Not a universal EPS solution: unusual compression schemes, special postscript functions, or printer-specific operations may be outside the supported subset.
  • Radial gradients are not currently generated.
  • Heavily nested transparency effects, font substitution (fonts must be converted to outlines), or complex object patterns are not fully supported at this stage.
  • The workflow relies on Ghostscript’s PDF conversion as an intermediate step. This is more stable than direct EPS parsing, but it is not infallible.

Requirements

  • Python 3.10+
  • Ghostscript (SVG emitter and CMYK colour conversion)
  • Optional: pytest for running tests

Minimal dependencies are used for the converter itself; the colour conversion falls back to a naive formula if Ghostscript is not available, in which case you will get the approximate CMYK-to-RGB mapping.

Installation

pip install eps2svg

Or to install locally from the source repository:

python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Quick start

eps2svg input.eps output.svg

Example:

eps2svg logo.eps logo.svg

Expected results:

  • Output contains proper <linearGradient> definitions
  • Colour values are stable (no flicker between renderers)
  • Clip structure is logically layered

Example (real world)

A typical company logo uses CMYK-defined brand colours with a blended gradient. Instead of flattening to two stops and shifting the colours, eps2svg produces clean colour stops, correct masks, and a compact, future-proof SVG.

Current status

  • Small but actively maintained script core.
  • Corrected for key pain points: clipping, gradient retention, CMYK colour fidelity.
  • The aim is to remain practical and reliable rather than broadly compatible with every possible EPS variant.

License

MIT – see LICENSE.

Contributing

Issues, test cases, and small improvements are very welcome. Good pull requests should include one or more real-world EPS samples to demonstrate the fix and ensure it stays locked in.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eps2svg-0.1.1.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eps2svg-0.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file eps2svg-0.1.1.tar.gz.

File metadata

  • Download URL: eps2svg-0.1.1.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for eps2svg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 30eaf87d4f9be5f9af31e0b3b1377f5ff1e8419704c55b393d3ac106366bcf20
MD5 ac4ca93bb0082c249a2f31cc5e031eef
BLAKE2b-256 c2f8d98ce4923c6b992f30ba00e09c9f62dfd31f9c8a4b6d68916315ab4a9a80

See more details on using hashes here.

Provenance

The following attestation bundles were made for eps2svg-0.1.1.tar.gz:

Publisher: publish.yml on JUNGHERZ/eps2svg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eps2svg-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: eps2svg-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for eps2svg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9e65f849b5423395ea4df20e660c2ea1be9434f0cc098e712ac973403e5c7155
MD5 f7fba13ca96b028a1af2e4d5bddbe284
BLAKE2b-256 1e79de7a65687dea0f1e389e7c4301be54714dac908341e53b03aae924d134ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for eps2svg-0.1.1-py3-none-any.whl:

Publisher: publish.yml on JUNGHERZ/eps2svg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page