Printing Datatable with Many Columns

Printing Datatable with Many Columns

tishadtishad Posts: 4Questions: 2Answers: 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%');
}
This discussion has been closed.