Hi Am using HTML2canvas plugin for converting a DIV inside a modal dialog. The conversion works fine. But that div is having vertical scroll. So on the final image there is nothing was converted after the scrolled hidden area. Only the visible top portion of the div is in the rendered image. So how can I convert the whole div (doesnt matter the scroll) to an image.. Here is my code
$('#modal_sidebyside .modal-content').html2canvas({
onrendered: function (canvas) {
//Set hidden field's value to image data (base-64 string)
$('.export-sidebyside').hide();
//$('#modal_sidebyside .modal-body').css({ 'overflow-y': 'auto', 'height': 'auto' });
//$('#modal_sidebyside .modal-content').css({ 'overflow-y': 'auto', 'height': 'auto' });
var img = canvas.toDataURL('image/jpeg');
var link = document.getElementById("download-sidebyside");
link.download = "SidebySide.jpg"; //Setup name file
$(link).html("Download");
link.href = img.replace(/^data[:]image\/(png|jpg|jpeg)[;]/i, "data:application/octet-stream;");
$('.export-sidebyside').show();
// $('#modal_sidebyside .modal-body').css({ 'overflow-y': 'auto', 'height': '80%' });
// $('#modal_sidebyside .modal-content').css({ 'overflow-y': 'auto', 'height': '100%' });
//document.body.appendChild(link);
}
});