unable to load images from backend #2682
Replies: 1 comment
-
Hey I see not much activity on this topic. html2canvas(document.getElementsByTagName('vaadin-app-layout')[0], {}) If I run the code like this I get a screenshot downloaded, but images are missing (if there are images on the screen). I read here and there and if I apply some options to the html2canvas function (useCORS:true), I see that my browser log is full of errors basically telling me that: |
Beta Was this translation helpful? Give feedback.
-
Hi, I was trying to convert html to image, the result seems like the images which we were getting urls from backend got missing.
Here is the reference code that I have tried with:
var imgContainer = document.getElementById("student-chart");
html2canvas(imgContainer,{allowTaint : true, useCORS : true}).then(function(canvas) {
var link = document.createElement("a");
document.body.appendChild(link);
link.download = "xxxxxx.png";
link.href = canvas.toDataURL("image/png");
link.target = '_blank';
link.click();
})
can anyone please share your inputs on resolving this issue? Thank you
Beta Was this translation helpful? Give feedback.
All reactions