gofpdf
gofpdf copied to clipboard
Cannot parse SVG with <g> tags
When parsing an svg before writing it to a pdf using SVGBasicParse(), if the svg contains
@nicholaspuglia -- can you provide a small example of an SVG file before and after the tags are removed?
Before the
<?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
<?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>