[reportlab-users] SVGlib howto

Dinu Gherman reportlab-users@reportlab.com
Sat, 24 Apr 2004 10:58:58 +0200


Martin Herceg:

> halo,
> can u help me pls with SVG library?
> i need some example how can i draw converted (from SVG2RTG) graphics
> thanx

Hi Martin,

I'm not sure I know what you mean by SVG2RTG, but I assume you mean
SVG2RLG, where RLG means "ReportLab Graphics". The svglib module
that you have probably downloaded from the following page contains
eight sample SVG files plus their PDF equivalents generated by
svglib: http://python.net/~gherman/svglib.html .

Here's what I do to convert one such sample SVG file to PDF:

[localhost:svglib/sources] dinu% python svglib.py
svglib.py (v. 0.5) - an experimental SVG to RLG/PDF converter
Usage: python svglib.py [--help] <file1.svg(z)> [<file2.svg(z)> ...]
[localhost:svglib/sources] dinu%
[localhost:svglib/sources] dinu% python svglib.py ../samples/newlion.svg
../samples/newlion.svg
[localhost:svglib/sources] dinu%

I hope that helps.

Dinu

--
Dinu C. Gherman - http://python.net/~gherman
......................................................................
"Terrorism is the war of the poor, and war is the terrorism
of the rich." (Peter Ustinov)