Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 73935

Div Printing! The printed data is not set in multiple pages for a long table having 300 columns

$
0
0

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;
}

Viewing all articles
Browse latest Browse all 73935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>