python - Generating PDFs from SVG input -


i trying generate pdf svg input file python in django application.

i have found 2 working solutions: cairo+rsvg , imagemagick both have 1 problem: have strange dependencies not want install on server, example dbus , gtk.

so asking method generating pdf svg without having install these stupid dependencies on server.

have considered svglib?

it looks quite promising, reportlab featured pdf tool in django's docs.

>>> svglib.svglib import svg2rlg >>> reportlab.graphics import renderpdf >>> >>> drawing = svg2rlg("file.svg") >>> renderpdf.drawtofile(drawing, "file.pdf") 

Comments