I'm trying to get snapshot of the table and generate a pdf using html2canvas and jsPDF in React. But the isssue is only the part of table that is visible gets generated where as horizontal and vertical scrollable part of table which is invisible is not getting in the pdf. Any help to this issue is highly appreciated. Thanks in advance.
html2canvas($("#canvas"), {
onrendered: function(canvas) {
var imgData = canvas.toDataURL(
'image/png');
var doc = new jsPDF('p', 'mm');
doc.addImage(imgData, 'PNG', 10, 10);
doc.save('sample-file.pdf');
}
});