-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdf Rendering of Elements depend on size specified by the svg-tag #160
Comments
maybe this bug is related: https://bugs.freedesktop.org/show_bug.cgi?id=103071 BTW: why culling tiny Elements in Vektorgraphics ??? |
Found a workaround:
Ervin |
Thank you for this very clear bug report. As rendering seems to be good when generating PNGs and bad when generading PDFs, it's probably a bug in cairo. I'll try the patch included in bug 103071 and tell you if it helps. |
It fixes the problem! Wow. The patch is 2 days old, what an increadible timing.
Cairo is full of optimizations you don't notice until (1) you hit a corner case when the optimization doesn't apply and have bad performance (2) you find a bug related to this optimization and fight against for days/months/years (see Kozea/WeasyPrint#278). 😄 |
Just to accomplish. This works with the current cairo snapshot 1.15.8 and the referenced patch, not with the widely used release versions 1.14.8-10. Ervin |
I'm working with small graphics from traffic signs on maps. A perl script generates svg in paper format sizes which contains everything... When viewing svg everything looks as expected by the svg code. But trying cairosvg genPlan1.svg -o plan1.pdf (v 1.0.22) produces something else. The filled rectangles as background of the signs disappeared.
Then I figured out that if change the size of the svg by increasing width and height the missing backgrounds reappear in pdf. additionally decreasing the size makes more elements disappear.
What is going on?
But when I try the svg via inkscape, svg looks fine. exporting to pdf produces the same artefacts, missing backgrunds on signs. Inkscape saves pdf via cairo (1.14.8).
should look like:
plan1.pdf
but 10 times smaller:
plan1small.pdf
and 100 times smaller
plan1tiny.pdf
the svg
genPlan.zip
Is there something to adjust? the dpi option does't change anything. Is there a workaround?
ervin
The text was updated successfully, but these errors were encountered: