[reportlab-users] SVG support on the Canvas?

Roberto Alsina ralsina at netmanagers.com.ar
Tue Jun 2 17:50:48 EDT 2009


On Tuesday 02 June 2009 16:59:21 Bill Janssen wrote:

> Roberto Alsina <ralsina at netmanagers.com.ar> wrote:

> > Bill Janssen writes:

> > > I'm wondering if there are plans for the Canvas class to grow a

> > > "drawSVG" method akin to "drawImage"? Seems like it might be a nice

> > > fit.

> > >

> > > I know about Dinu Gherman's code, but it unfortunately is released

> > > under a charming oddball license which IMO makes it pretty much

> > > impossible for anyone but hobbyists to use.

> >

> > Have you looked at my uniconvertor-based svg flowable?

>

> Found it. http://lateral.netmanagers.com.ar/weblog/2008/09/10.html#BB753

>

> If I understand what you're doing, you're converting the SVG to PDF,

> then pasting that PDF inline in the document that ReportLab is

> generating.


No, actually the PDF file it generates is a side effect, I am passing the
uniconvertor code a canvas and the SVG gets drawn in it after it's parsed.

It's completely broken for SVGs that have text in them, though.

--
("\''/").__..-''"`-. . 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)
"Our opponent is an alien starship packed with atomic bombs, I said.
We have a protractor. Okay, I’ll go home and see if I can scrounge up a
ruler and a piece of string." — Neal Stephenson


More information about the reportlab-users mailing list