Skip to content
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

SVG rendering problem - part of picture not visible in pdf render #2240

Closed
lafar6502 opened this issue Aug 23, 2024 · 3 comments · Fixed by #2242
Closed

SVG rendering problem - part of picture not visible in pdf render #2240

lafar6502 opened this issue Aug 23, 2024 · 3 comments · Fixed by #2242
Labels
bug Existing features not working as expected
Milestone

Comments

@lafar6502
Copy link

lafar6502 commented Aug 23, 2024

(continued from #2239)

Thanks, you're right - markers were missing. But after removing the markers - still the picture is not rendered correctly.
But this time i'm not getting any error message.
pdf:
image
svg: something like
image

Here's the test case - updated svg.
test_p2.zip
RG

Originally posted by @lafar6502 in #2239 (comment)

(edit) i think nesting of SVG elements might be related to this problem

@liZe
Copy link
Member

liZe commented Aug 23, 2024

i think nesting of SVG elements might be related to this problem

Yes, that’s because svg tags with no size are not supported. We could do the same hack as cf72dfc.

@liZe liZe added the bug Existing features not working as expected label Aug 23, 2024
@lafar6502
Copy link
Author

lafar6502 commented Aug 24, 2024

You mean, change <svg> to <g> tag?
For some cases it would work, but i have also a case where a larger svg is composed of sub-svgs coming from another place, so some xml manipulation would be necessary.

@liZe
Copy link
Member

liZe commented Aug 24, 2024

You mean, change to tag?

I mean we should use the same fix in WeasyPrint for svg than the one we used for symbol in cf72dfc.

Using g instead of svg in your sample should work as a workaround, but let’s really fix that in WeasyPrint instead!

@liZe liZe added this to the 63.0 milestone Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants