Skip to content
Resizes and frames an SVG image
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
__init__.py
svg_resize.py Make this work as a module, and fix a huge tree error Apr 15, 2018

README.md

SVG Resizer

Resizes SVG file to fit into given dimensions. For example, --width 210 --margin 10 would scale an image to 190 mm width with 10 mm margins. This is highly useful for postprocessing autogenerated SVG files for converting to PDF, so paper format is consistent with other pages. If two dimensions are specified (e.g. --longest 297 --shortest 210), target scale is chosen so an image fits into both of them (possibly leaving bigger margin). Default units are millimeters.

After resizing the script can add a white frame to hide parts of image that should not be shown: use --frame option for that.

Author and license

The script was written by Ilya Zverev and published under WTFPL.

You can’t perform that action at this time.