$npx skillfedfor your agent

CairoSVG

A Simple SVG Converter based on Cairo

Worth itPyPI Graphics ConversionReleased Mar 202620.7M downloads / moLGPL-3.0-or-laterPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — cairosvg-2.9.0-py3-none-any.whl
v2.9.0 · released 2026-03-13 · Python >=3.10 · 5 runtime deps: cairocffi, cssselect2, defusedxml, pillow, tinycss2

Yes. CairoSVG is production-stable, actively maintained, has low install friction, no known vulnerabilities, and solves a concrete problem (SVG conversion to multiple formats). The LGPL copyleft license is standard for graphics libraries and poses no barrier for most use cases. Install if you need reliable SVG-to-PDF/PNG/EPS conversion.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; Cairo graphics library must be available on the system (typically pre-installed on most Linux distributions, may require separate installation on macOS or Windows).
  • Low install friction with a pure Python wheel distribution.
  • Active maintenance with a recent release (154 days ago) and ongoing repository activity; supports current Python versions (3.10–3.14).

License · maintenance · safety

LGPL-3.0-or-later (copyleft) — LGPL-3.0-or-later copyleft license requires that derivative works and modifications remain under the same license; acceptable for most projects but review your distribution model if you plan to bundle or modify the source.

last release 2026-03-13 (154 days) · last repo commit 2026-07-05 · 948 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 20,670,714 downloads/mo, #1,029 on PyPI

Verify before relying

pip install cairosvg

import cairosvg

carosvg.svg2pdf(url='input.svg', write_to='output.pdf')
  • Whether Cairo system library is pre-installed or requires manual setup on Windows and macOS platforms.
  • Performance characteristics when converting large or complex SVG files in batch operations.
Same gist for agents: .md · .json

What it is and what it does

CairoSVG is a Python library that renders SVG files to multiple output formats—PDF, EPS, PostScript, and PNG—by delegating rendering to the Cairo graphics engine. It wraps Cairo functionality through cairocffi and uses cssselect2 and tinycss2 to parse SVG stylesheets and selectors, defusedxml to safely parse XML, and Pillow for raster image handling. The library is stable (Production/Stable status), actively maintained, and supports modern Python versions from 3.10 onward.

Typical use cases include batch conversion of vector graphics for print or web distribution, programmatic SVG-to-PDF generation in document pipelines, and rendering SVG content to raster formats when vector output is not required. The copyleft LGPL license means you must disclose modifications if you redistribute the library, but using it as a dependency in your own application is straightforward.

Use it for

  • Convert SVG graphics to PDF for embedding in reports or print-ready documents.
  • Batch export SVG icons or illustrations to PNG for web use or mobile apps.
  • Generate PostScript or EPS output from SVG for legacy printing systems or archival.
  • Programmatically render SVG content in a document generation pipeline without manual design tool steps.
  • Transform vector graphics to raster formats when downstream tools require PNG or similar formats.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

CairoSVG is production-stable, actively maintained, has low install friction, no known vulnerabilities, and solves a concrete problem (SVG conversion to multiple formats). The LGPL copyleft license is standard for graphics libraries and poses no barrier for most use cases. Install if you need reliable SVG-to-PDF/PNG/EPS conversion.

Install

cairosvg on PyPI

Before you install

Low install friction with a pure Python wheel distribution. Active maintenance with a recent release (154 days ago) and ongoing repository activity; supports current Python versions (3.10–3.14).

Requires Python 3.10 or later; Cairo graphics library must be available on the system (typically pre-installed on most Linux distributions, may require separate installation on macOS or Windows).

License in practice

LGPL-3.0-or-later copyleft license requires that derivative works and modifications remain under the same license; acceptable for most projects but review your distribution model if you plan to bundle or modify the source.

Quickstart

pip install cairosvg

import cairosvg

carosvg.svg2pdf(url='input.svg', write_to='output.pdf')

Verify before relying

  • Whether Cairo system library is pre-installed or requires manual setup on Windows and macOS platforms.
  • Performance characteristics when converting large or complex SVG files in batch operations.

Package facts

LicenseLGPL-3.0-or-later copyleft
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
cairocfficssselect2defusedxmlpillowtinycss2
MaintenanceActively maintained 154 days since the last release
Last repo commit
First released
Downloads20,670,714 / month, #1,029 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: End Users/DesktopOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Multimedia :: Graphics :: Graphics Conversion

Evidence: cairosvg-2.9.0-py3-none-any.whl

Tags

Capabilities
svg to pdf convertersvg to png exportcairo svg conversionbatch svg conversionsvg graphics renderingsvg postscript exportvector to raster conversion
Topics
svg-conversiondocument-generationgraphics-rendering
PyPI keywords
svgconvertercairopdfpngpostscript

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “svg to png export”

  • CairoSVGCairoSVG converts SVG files to PDF, EPS, PS, and PNG formats using…
  • kaleidoKaleido generates static images (PNG, SVG, PDF, etc.) from figures,…
  • vl-convert-pythonConverts Vega-Lite chart specifications to static SVG or PNG images,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Graphics Conversion packages

pillow Worth it
PyPI · Graphics · released Jul 2026

Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.

Install it if you need to work with images in Python—it is the de facto standard for this task.

MIT-CMUcompiled wheel · 3.10+
547.1Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.

Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
weasyprint Worth it
PyPI · WWW/HTTP · released Jun 2026

WeasyPrint converts HTML and CSS into PDF documents using a Python-based rendering engine designed for pagination and document generation.

BSD-3-Clausepure Python · 3.10+
39.7Mdownloads / mo
pillow-heif With conditions
PyPI · Software Development · released Jul 2026

pillow-heif adds HEIF/HEIC image format support to Python, enabling decoding and encoding of 8, 10, and 12-bit HEIC files with metadata and depth image handling.

GPL-2.0-onlycompiled wheel · 3.10+
13.2Mdownloads / mo
rasterio Worth it
PyPI · GIS · released Aug 2026

Rasterio reads and writes geospatial raster data in formats like GeoTIFF, providing a Python API based on N-D arrays for working with gridded datasets.

BSD-3-Clausecompiled wheel · 3.12+
9.7Mdownloads / mo
pi-heif With conditions
PyPI · Software Development · released Jun 2026

Decodes HEIF/HEIC image files and integrates with pillow for reading and conversion to other formats, supporting 8/10/12-bit color depths and depth images.

LGPL-3.0-onlycompiled wheel · 3.9+
9.6Mdownloads / mo

See also sphinxcontrib-svg2pdfconverter · svglib · typst · vtracer · rlPyCairo · svgutils · resvg_py · scour · napari-svg · svg.py