1

I have the following inline code:

<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
....
<svg width="1152" height="648" viewBox="0 0 1152 648" aria-describedby="title" id="svg">
    <title id="title">Supporter Plan</title>

    <image xlink:href="../images/Image1.png" x="0" y="0" width="100%" height="100%"></image>
    <image xlink:href="../images/Image2.png" x="0" y="0" width="100%" height="100%"></image>

    <foreignobject x="190" y="177" width="811" height="373">
        <body xmlns="http://www.w3.org/1999/xhtml">
        <iframe style="border: none" src="../fo.html" scrolling="no" width="100%" height="100%">

        </iframe>
        </body>

    </foreignobject>
</svg>
...
</body>
</html>

I want to save the created image as a file. However, if I save it by creatig a link var url = "data:image/svg+xml;charset=utf-8,"+encodeURIComponent(source); where source is the svg content with the needed headers, the created file doesn't evaluate the images nor the iframe.

How can I solve this?

akatyabg1
  • 11
  • 1
  • I had a similar problem when attempting to save svg images with embedded images. I am able to save images roughly 6,000,000px in dimension. My answer is here: https://stackoverflow.com/questions/28226677/save-inline-svg-as-jpeg-png-svg/57403583#57403583 – Chadd Frasier Nov 19 '19 at 20:24

0 Answers0