[reportlab-users] Scalable vector images in reportlab (cleaned up code)
Roberto Alsina
ralsina at netmanagers.com.ar
Thu Sep 11 17:36:23 EDT 2008
I'm surprised noone seems to be interested in using SVG/EPS/whatever via
reportlab, but anyway, since I wanted it I just finished comitting clean(ish)
code to do it, and post it here since this subject pops up every year or so.
The code is just two small modules (and you need to install uniconvertor).
http://code.google.com/p/rst2pdf/source/browse/trunk/rst2pdf/svgimage.py
http://code.google.com/p/rst2pdf/source/browse/trunk/rst2pdf/uniconvsaver.py
No known bugs (not looked much for'em myself).
New sample PDF with smooth, scalable, small (in bytes) graphic:
http://lateral.netmanagers.com.ar/static/svg.pdf
--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it. --Brian W. Kernighan
More information about the reportlab-users
mailing list