html2canvas.js not capturing image. it leaves white space where the image occurs.
JavaScript
x
13
13
1
function capture()
2
{
3
html2canvas(document.body, {
4
allowTaint: true,
5
logging:true,
6
onrendered: function(canvas) {
7
imagestring = canvas.toDataURL("image/png");
8
console.log(imagestring);
9
document.body.appendChild(canvas);
10
}
11
});
12
}
13
I have tried a lot but i cannot find solution .
Help is appreciated 🙂
Advertisement
Answer
It works, when I host it in the server. The security restrictions causes it to fail.