I am trying to grab an SVG from a browsertool (pgadmin4
). However, I end up with an SVG that renders incorrectly. The generated graphic uses SVG "icons" by referencing external files. While this works nicely in the browser, all the colored pixels of these embedded SVGs are rendered 100% black. (After I fixed the links to point to the right files. As can be seen the shapes are correct).
Here is the image from the browser:
And here what I get in inkscape:
Questions:
- How can I get my extracted image to render correctly?
- Is there a tool to automatically embed the linked SVGs, so I have a single file to pass on? (I have inkscape installed but anything that works would help)
Minimal example
Example source of an svg:
<svg height="200" version="1.1" width="150" xmlns="http://www.w3.org/2000/svg"><desc>Created with Snap</desc><defs></defs><g><g><image xlink:href="misc/static/explain/img/ex_scan.svg" preserveAspectRatio="none" x="50" y="50" width="50" height="50"></image><text x="80" y="120" style="font-size: 15px; text-anchor: middle;"><tspan>public.customer</tspan></text></g></g></svg>
Human readable formatting:
<svg height="200" version="1.1" width="150" xmlns="http://www.w3.org/2000/svg">
<desc>Created with Snap</desc>
<defs></defs>
<g>
<g>
<image xlink:href="misc/static/explain/img/ex_scan.svg" preserveAspectRatio="none" x="50" y="50" width="50" height="50"></image>
<text x="80" y="120" style="font-size: 15px; text-anchor: middle;">
<tspan>public.customer</tspan>
</text>
</g>
</g>
</svg>
The image linked by the example image comes from pgadmin4
and can be found here.