Closed nettlef closed 4 years ago
Please provide some code.
from svglib.svglib import svg2rlg from reportlab.pdfgen import canvas from reportlab.graphics import renderPDF
rlg = svg2rlg("test.svg") c = canvas.Canvas("example.pdf") c.setTitle("my_title_we_dont_care") renderPDF.draw(rlg, c, 80, 740 - rlg.height,showBoundary=False) c.showPage() c.save()
At this moment I solved the issue by editing the svg produced by matplotlib (removing the defs part at the end)... But when I remove this part, there are then links inside the svg that are inconsistent. test.zip
Could you please add more details on what exactly is not looking right, maybe with screenshots? Can you confirm that you are using svglib 1.0.0 ?
BTW, this text is shown when creating a new issue:
BTW, this text is shown when creating a new issue...
""" When submitting a new issue please try to be as concise and precise as possible. This means to show only minimal SVG or PDF files that show something unexpected.
In times of widely available files infected with malicious code on the net, it is also appreciated to better include bitmap snapshots of your PDFs inside an issue.
Otherwise please provide information where relevant like specific versions of components in your setup, e.g. OS, Python, reportlab, svglib, type of install or anything else. """
Please reopen as soon as you can provide us some more details.
When spines (borders) of matplotlib graph are set to not visible or different colour, this is not transformed correctly by svg2rlg.