deeplook / svglib

Read SVG files and convert them to other formats.
GNU Lesser General Public License v3.0
322 stars 79 forks source link

RenderPDF and RenderPM not working #257

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello, This is my code:

from svglib.svglib import svg2rlg from reportlab.graphics import renderPDF, renderPM

drawing = svg2rlg('C:/Users/..../newplot 1.svg') print(drawing) renderPDF.drawToFile(drawing, "abcde123.pdf") renderPM.drawToFile(drawing, "file.png", fmt="PNG")

The print(drawing) gives <reportlab.graphics.shapes.Drawing object at 0x000001AF1581D1C0>, but no files are created in the folder where the image newplot.svg is present.

Can anybody help?

Thanks in advance!

claudep commented 3 years ago

I guess the files are created in the directory you are in. You can provide full paths instead so you have no doubt about the file destination. Note that the ticket tracker is not aimed for support but for bug reporting, you should use forums (Stackoverflow and such) to get help.