I am trying to convert an SVG file to PDF in python using the
svglib
and reportlab
packages. Here is the SVG file.
Here is the code I am using to convert (got this from svglib
webpage).
>>> from svglib.svglib import svg2rlg
>>> from reportlab.graphics import renderPDF
>>> drawing = svg2rlg("file.svg")
>>> renderPDF.drawToFile(drawing, "file.pdf")
The code runs fine without any error or exception but the file.pdf
thus generated is a blank file. I mean that when I open this PDF file I see nothing but only white background page with nothing on it.
Where am I going wrong ?
Asked by g4ur4v
(1864 rep)
May 15, 2013, 01:23 PM
Last activity: May 15, 2013, 02:34 PM
Last activity: May 15, 2013, 02:34 PM