Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html2canvas not capturing image

html2canvas.js not capturing image. it leaves white space where the image occurs.

function capture()
{
    html2canvas(document.body, {
        allowTaint: true,
        logging:true,
        onrendered: function(canvas) {
        imagestring = canvas.toDataURL("image/png");
        console.log(imagestring);
        document.body.appendChild(canvas);
        }
    });
}

I have tried a lot but i cannot find solution .

Help is appreciated :)

like image 311
Karthikeyan Avatar asked Jan 03 '15 11:01

Karthikeyan


1 Answers

It works, when I host it in the server. The security restrictions causes it to fail.

like image 98
Karthikeyan Avatar answered Oct 02 '22 14:10

Karthikeyan