Created
April 24, 2018 15:32
-
-
Save davidlenz/9c679c60d69e76121c677ca39e0b4336 to your computer and use it in GitHub Desktop.
SVG to PDF using svglib and reportlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from svglib.svglib import svg2rlg | |
from reportlab.graphics import renderPDF | |
def svg_to_pdf(in_path, out_path): | |
# svg to pdf | |
drawing = svg2rlg(in_path) | |
renderPDF.drawToFile(drawing, out_path) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment