tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.21k stars 1.68k forks source link

Rendering svg #461

Open aparzi opened 1 year ago

aparzi commented 1 year ago

I have this node but it's not rendering

`

            <text x="426" y="1312" fill="red" font-size="0.4em" style="font-family: Verdana, serif">24(0)*1272.73</text>

                <image x="490" y="1293" width="25" height="25" xlink:href="http://localhost:4000/assets/media/users/default.jpg"></image>

            <line x1="312.5" y1="1304" x2="400" y2="1304" style="stroke:rgb(251,0,2); stroke-width:1"></line>

            <text x="326" y="1312" fill="red" font-size="0.4em" style="font-family: Verdana, serif">24(null)*1785.4</text>

                <image x="390" y="1293" width="25" height="25" xlink:href="http://localhost:4000/assets/media/users/default.jpg"></image>

            <line x1="400" y1="1254" x2="500" y2="1254" style="stroke:rgb(251,0,2); stroke-width:1"></line>

            <text x="426" y="1262" fill="red" font-size="0.4em" style="font-family: Verdana, serif">24(0)*931.01</text>

                <image x="490" y="1243" width="25" height="25" xlink:href="http://localhost:4000/assets/media/users/default.jpg"></image>

            <line x1="397" y1="1204" x2="497" y2="1204" style="stroke:rgb(251,0,2); stroke-width:1"></line>

            <text x="423" y="1212" fill="red" font-size="0.4em" style="font-family: Verdana, serif">24(0)*492.81</text>

                <image x="487" y="1193" width="25" height="25" xlink:href="http://localhost:4000/assets/media/users/default.jpg"></image>

            <line x1="394" y1="1154" x2="494" y2="1154" style="stroke:rgb(251,0,2); stroke-width:1"></line>

            <text x="420" y="1162" fill="red" font-size="0.4em" style="font-family: Verdana, serif">24(null)*424.01</text>

                <image x="484" y="1143" width="25" height="25" xlink:href="http://localhost:4000/assets/media/users/default.jpg"></image>
                <image x="178" y="1293" width="25" height="25" xlink:href="http://localhost:3001/icons/cnas-tim-icons/jpg/icn_cabinet_external.jpg"></image>
            <line x1="200" y1="1304" x2="300" y2="1304" style="stroke:rgb(251,0,2); stroke-width:1"></line>

            <text x="226" y="1312" fill="red" font-size="0.4em" style="font-family: Verdana, serif">24(null)*961.93</text>

                <image x="290" y="1293" width="25" height="25" xlink:href="http://localhost:4000/assets/media/users/default.jpg"></image>

            <line x1="300" y1="1104" x2="400" y2="1104" style="stroke:rgb(251,0,2); stroke-width:1"></line>

            <text x="326" y="1112" fill="red" font-size="0.4em" style="font-family: Verdana, serif">24(null)*605.36</text>

                <image x="390" y="1093" width="25" height="25" xlink:href="http://localhost:4000/assets/media/users/default.jpg"></image>
                 </svg></div></div></body>`