converted characters flock
Opened this issue · 7 comments
I installed latest svglib
and reportlab-3.6.9-cp38-cp38-win_amd64.whl
on python-3.8.1.amd64
on my windows 10 64 bits.
however the generated png and pdf is in a mess
the original svg and generated pdf/png is in the attached zip
tmp.zip
from svglib.svglib import svg2rlg
from reportlab.graphics import renderPDF, renderPM
drawing = svg2rlg("tmp.svg")
renderPDF.drawToFile(drawing, "file.pdf")
renderPM.drawToFile(drawing, "tmp.png", fmt="PNG")
Thank you for raising your first issue! Your help to improve svglib is much appreciated!
Your original svg looks weird, when opening it with inkscape, I'm only seeing a blank page.
but all of Edge/Chrome/FireFox/CairoSVG can render it correctly
FWIW, it looks ok in https://www.svgviewer.dev.
When debuging this issue, I find different issues. It looks like <symbol>
handling is broken in several ways currently in svglib.
I'll see if I can do something. I started in #329 by only rendering <symbol>
when referenced, as the specs says (A [‘symbol’] element itself is not rendered.
) It is not fixing this issue yet, as after that patch, your document will be blank.
no, if I use the lastet cloned svglib, my script in the beginning post can only produce blank PDF and PNG, in other words, there is no character in PDF and PNG