Missing rows while exporting data from table in pdf document
Missing rows while exporting data from table in pdf document
ln38
Posts: 5Questions: 3Answers: 0
Hi !
I'm using pdfmake with my jquery datatable to export its content to a pdf document.
I use serverside processing because according to user's selection, my table may contain a lot of rows (about 500 000).
The generation of the pdf document seems ok but actually there are only about 1500 rows in it, whereas the table contains much more rows.
What is the problem ?
Here is an extract of my code:
var table = $('#table_events').DataTable({
dom: 'Bfrti',
buttons: [
{
extend: 'pdfHtml5',
text:'Export to PDF',
className: 'custom-html-collection',
title: title,
orientation: 'landscape',
pageSize: 'A4',
message: extraTitle,
exportOptions: {
columns: [1,3]
},
customize : function(doc) {
doc.content[index].table.widths = [ '10%', '90%'];
doc.defaultStyle.fontSize = 8;
doc.defaultStyle.font = 'Roboto';
doc.styles.tableHeader.fontSize = 9;
}
}
],
...
Thank you!
Answers
Hi,
See this FAQ which covers this topic.
Allan
Hi Allan,
Thanks a lot for your really quick answer !
The answer seems obvious actually ;-)