PDF export not showing all of table
PDF export not showing all of table
colinod
Posts: 3Questions: 2Answers: 0
I have a large table with 52 columns and when i export to pdf it is only showing what is on the page and not doing more pages for more columns.
Also i have a header with two rows and it is not showing both rows
the page is hidden behind a login so cannot show on here but code for datatable is
$(document).ready(function() {
$('#example').DataTable( {
"lengthMenu": [[100, 250, 500, -1], [100, 250, 500, "All"]],
dom: 'Blftip',
select: true,
"scrollY": 600,
"scrollX": true,
buttons: [
{extend: 'excel',
footer: 'true',
text: 'Excel',
title:'Statistics' },
{extend: 'pdf',
footer: 'true',
text: 'pdf',
orientation: 'landscape',
title:'Statistics' },
'print',
{extend: 'excel',
text: 'Selected Excel',
footer: 'true',
title:'Statistics',
exportOptions: {
modifier: {
selected: true
}
}
},
{
extend: 'pdf',
footer: 'true',
orientation: 'landscape',
title:'Statistics',
text: 'Selected PDF',
exportOptions: {
modifier: {
selected: true
}
}
}
]
} );
} );
This discussion has been closed.
Answers
yes,if the data processing server,datatables-buttons-pdf can`t export all of columns but export a page of data.
my solution:when you chick the button(pdf),start a new ajax to get all of data
after my test,the datatables-buttons-excel is working maybe the pdf is also working!
datatables.js:
ps:happy to coding!!!
LiuWei
I do not use json to call my data it is loaded into a table in the same page using classic asp.
will this matter as i am unsure how to use this
Thanks for your help