dom-to-image
dom-to-image copied to clipboard
Image of svg element from DOM is not embedded in png.
Hi everyone,
My DOM contains svg element-under div element, which is created using javascript. And that svg has image element,as shown in attached image(html.png). With this domtoPng, in downloaded png file, I am able to see all elements from dom, except this image of svg,(which I set it as background for graph) .
When I run my app, I can see the image (i.e included in my dom) as shown in expected image.But png file, that I got by downloading using domtopng excludes that image.You can check on result.png, that shows missing
image.
Please let me know, if anyone comes with such issue.
Thanks Binita Shrestha
I have the same problem
Hey @tanrich dom-to-image.min.zip
I solved this issue using this js file. You can try using this file.
Thanks
Thanks
I don't understand. What's the difference. Thanks.
Somewhere I found this file and suggested to try using this one and that worked for me. I don't remember exactly what changes I made. I am not sure if this will work for you but yes, you can give a try.
Hi! Your solution great work with fill: url(#namePattern) but not work with stroke: url(#namePattern), maybe you can add this feature, please?
For me what worked was installing html-to-image and not using dom-to-image
...
https://root.lacony.ru/eclipse i try use html-to-image there (when click on one object) but its work bad, if dom-to-image just wrong work with svg, this lib create strange gradients