I'm using the Div print method to download or print the data of a long table. i face the problem that only a few columns are shown on one page and the remaining is looking cutting on the first page...means the data is not setting in multiple pages...
The code that i'm using is below
$scope.pdf = function () {
var getpanel = document.getElementById("table-scroll");
var MainWindow = window.open('', '', '');
var style = document.getElementById('printcss').value;
MainWindow.document.write('<html><head><title></title>');
MainWindow.document.write("<link rel=\"stylesheet\" href=\"styles/Print.css\" type=\"text/css\"/>");
MainWindow.document.write('</head><body onload="window.print();window.close()">');
MainWindow.document.write(getpanel.innerHTML + '<style>' + style + '</style>');
MainWindow.document.write('</body></html>');
MainWindow.document.close();
setTimeout(function () {
MainWindow.print();
}, 500)
return false;
}