[reportlab-users] 'gradient' svg to rlg

Dinu Gherman gherman at darwin.in-berlin.de
Thu Feb 15 13:28:06 EST 2007


Corrado Gioannini:


> hi *,

> i'd like to include a SVG logo into my PDF.

> i already did a similar thing a couple of times before using the svglib

> module to convert the SVG graphic into a RLG (thanks Dinu!!).

> but this time my logo has some 'gradients' (*) and when i try to

> convert it or use it into a PDF it ends out with the 'gradient' parts

> turned blank. i saw that svglib is intended to convert simple shapes

> and probably does not handle gradients.

> does anybody have some suggestions? :)

> 10x!


Ciao, Corrado!

ReportLab's PDF canvas has no support for gradients, but PDF has.
So it's basically a matter of extending the Canvas class. If I had
the time I would give it a try. Maybe in a couple of months.

Dinu

PS: BTW, you can still try my SVG2PDF converter online here:
http://me.in-berlin.de/~darwin/svg/svg2pdf.html



More information about the reportlab-users mailing list