Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81936

Printing Datatable with Many Columns

$
0
0

I am trying to print a datatable with many columns. The whole table is shown on the screen but when I click print, the columns keep getting stretched. As a result some columns get clipped from the printed document. I have tried using the customize function to set the td width but to no effect. Can anyone help me out?

This is what I tried following datatables documentation:

customize: function ( win ) {
$(win.document.body).find('table').addClass('display').css('font-size', '5px');
$(win.document.body).find('table').css('table-layout','auto');
$(win.document.body).find('th').css('width','10%');
$(win.document.body).find('td').css('width','10%');
}

Viewing all articles
Browse latest Browse all 81936

Trending Articles



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