Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

Cannot parse SVG with <g> tags #311

Open
nicholaspuglia opened this issue Sep 30, 2019 · 2 comments
Open

Cannot parse SVG with <g> tags #311

nicholaspuglia opened this issue Sep 30, 2019 · 2 comments

Comments

@nicholaspuglia
Copy link

When parsing an svg before writing it to a pdf using SVGBasicParse(), if the svg contains tags then it does not appear on the pdf. My current workaround is to remove the tags from the svg manually however, it would be convenient to remove this extra step.

@jung-kurt
Copy link
Owner

@nicholaspuglia -- can you provide a small example of an SVG file before and after the tags are removed?

@nicholaspuglia
Copy link
Author

Before the tag is removed:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="209" height="8"> <g stroke-linejoin="round" stroke-linecap="round" fill="none" stroke="black"> <path fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M 1 1 c 0.23 0.04 8.63 1.76 13 2 c 7.65 0.42 15.11 -0.35 23 0 c 23.02 1.02 43.97 3.11 67 4 c 12.35 0.48 23.88 0.46 36 0 c 5.76 -0.22 11.23 -1.83 17 -2 c 17.18 -0.51 51 0 51 0" /> </g> </svg>

After tag is removed:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="209" height="8"> <path fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M 1 1 c 0.23 0.04 8.63 1.76 13 2 c 7.65 0.42 15.11 -0.35 23 0 c 23.02 1.02 43.97 3.11 67 4 c 12.35 0.48 23.88 0.46 36 0 c 5.76 -0.22 11.23 -1.83 17 -2 c 17.18 -0.51 51 0 51 0" /> </svg>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants