mcwizard mcwizard -4 years ago 95
Python Question

Can I specify scaling when using the cairosvg module inside of python

The command line version of cairosvg allows scaling. Here is the output of the help function:

cairosvg -h
usage: cairosvg [-h] [-v] [-f {pdf,png,ps,svg}] [-d DPI] [-W WIDTH]
[-H HEIGHT] [-s SCALE] [-u] [-o OUTPUT]
input

CairoSVG - A simple SVG converter based on Cairo.

positional arguments:
input input filename or URL

optional arguments:
-h, --help show this help message and exit
-v, --version show program\'s version number and exit
-f {pdf,png,ps,svg}, --format {pdf,png,ps,svg}
output format
-d DPI, --dpi DPI ratio between 1 inch and 1 pixel
-W WIDTH, --width WIDTH
width of the parent container in pixels
-H HEIGHT, --height HEIGHT
height of the parent container in pixels
-s SCALE, --scale SCALE
output scaling factor


see also cairosvg documentation

How can one specify a scaling factor when using
cairosvg2png
inside of a Python script?

Answer Source

the documentation has been updated at: http://cairosvg.org/documentation/ with API documentation commit

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download