Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

clipPath and masks fail on larger page sizes #185

Open
pipwerks opened this issue Mar 11, 2024 · 0 comments
Open

clipPath and masks fail on larger page sizes #185

pipwerks opened this issue Mar 11, 2024 · 0 comments

Comments

@pipwerks
Copy link

Hello. Thanks for creating this utility, it has been really useful.

Just wanted to share an issue I've run into. I have an SVG containing a handful of <clipPath> and <mask>. Sometimes they work, and sometimes they don't. When they fail, they cause the rest of the page render to fail.

After playing with the online demo tool, I realized document size plays a factor. In my (limited) testing, the clip paths and masks worked fine in the default page size (US letter). My SVG is ~2200pt tall, so it gets truncated when using the US Letter page size. When I change the document size to the full height of the SVG, the rendering fails, as shown in this screenshot:

screenshot

For now, my solution is to simply strip the <def> elements from the SVG before sending to SVGtoPDF. I lose my masks and clip paths, but the rest of the file renders correctly.

Happy to provide more info or help test. Thanks

My sample SVG:

fretboard

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant