Html2canvas Doesn't Get Image Full Height
For some reason that I can't understand, the html2canvas is not capturing the whole height of the div. html2canvas($container, { height: $container.height(), onrendered: fu
Solution 1:
Solved.
My code is actually right, the problem was on a CSS file that I use. To avoid this I've deleted and call again the file while converting the div into an image.
// $= means that ends with
("link[href$='my.css']").remove();
html2canvas($container, {
onrendered: function(canvas) {
var data = canvas.toDataURL('image/png');
var file = dataURLtoBlob(data);
// etc
$('head').append("<link href='" + base_url + "public/css/my.css' rel='stylesheet'/>");
}
});
Post a Comment for "Html2canvas Doesn't Get Image Full Height"