Skip to main content
https://badge.fury.io/py/svg42pdf.svg

Unlike other graphic formats, SVG is usually hard to convert to PDF. Existing tools often suffer from the following limitations:

  • Do not work on all operating systems

  • Versions for different operating systems have different command-line interfaces

  • SVG is interpreted incorrectly

  • Dependencies are difficult to install

  • Have licencing issues

SVG42PDF is a tool for converting SVG to PDF using existing tools and libraries. Method of conversion can be specified by user, or it can be selected automatically.

Installation

From PyPI:

pip install --upgrade svg42pdf

From Github:

pip install --upgrade git+https://github.com/karel-brinda/svg42pdf

Examples

Use first working method:

svg42pdf input.svg output.pdf

Use Cairo:

svg42pdf -m cairo input.svg output.pdf

Use ReportLab:

svg42pdf -m reportlab input.svg output.pdf

Use Inkscape:

svg42pdf -m inkscape input.svg output.pdf

Use ImageMagick (does not keep vector representation):

svg42pdf -m imagemagick input.svg output.pdf

Use Wkhtmltopdf (using the Qt WebKit, creates big white margins):

svg42pdf -m wkhtmltopdf input.svg output.pdf

FAQ

  • Why is there 42 in the name?

    There are already too many tools called svg2pdf.

Release files for svg42pdf 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for svg42pdf 0.2.2
File Size Uploaded
SVG42PDF-0.2.2.tar.gz 28.5 kB Details

Release files / SVG42PDF-0.2.2.tar.gz

Download URL SVG42PDF-0.2.2.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1f1614d52773c86d8b3cf9e0f0baf1d2e081eac3c05b01399c9f8d8c9b222b76
BLAKE2b-256 checksum
How to use checksums
e0889216c0f4133ca6bac954cc72c3a675a0ae9c772f5fb095fe29de772783fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release history Release notifications | RSS feed

This release

0.2.2 This release

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

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