Skip to main content

Program for SVG to PDF conversion.

Project description

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.

Project details


Download files

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

Files for svg42pdf, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size SVG42PDF-0.2.2.tar.gz (28.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page