[reportlab-users] SVG in PDF library

Roberto Alsina ralsina at netmanagers.com.ar
Tue Nov 15 07:49:10 EST 2011


On 11/15/2011 9:41 AM, Yuriy Asyutin wrote:

> Hi all.

>

> I'm looking for the ability to include SVG data into PDF generated by

> ReportLab. Actually I need SVG to ReportLab Graphics object converter.

> There is `svglib` (http://pypi.python.org/pypi/svglib/0.6.0) for that

> purpose - the only issue is - it is of GPL license, which is not

> suitable for me.

>

> Does anybody has any experience in using any alternatives to svglib

> library with ReportLab? BSD, MIT, Apache licenses would work for me.


Here's what I use in rst2pdf, which supports a number of alternatives ;-)

This uses uniconvertor:
http://code.google.com/p/rst2pdf/source/browse/trunk/rst2pdf/svgimage.py
And here's a rather complicated class that can take PDF, SVG, and almost
every format supported by any image library that has a python binding
somewhere:
http://code.google.com/p/rst2pdf/source/browse/trunk/rst2pdf/image.py

Hope it helps!


More information about the reportlab-users mailing list