DataTable and PDFMake

Multi tool use
Multi tool use


DataTable and PDFMake



i want to add some data in div when exporting using datatable pdf button.
How to add div when exporting to pdf?
and i want to ask why my first row header doest show up when i export it



this is my script for datatable


$(document).ready(function() {
$('#globaldatatable').DataTable({
scrollX: '100%',
scrollY: 400,
iDisplayLength: '100',
ordering: false,
bPaginate: false,
sDom: '<"row"<"col-sm-6"B><"col-sm-6">>' + '<"row"<"col-sm-12"<"table-responsive"t>>>' + '<"row"<"col-sm-5"><"col-sm-7">>',
buttons: {
buttons: [
{ extend: 'pdfHtml5',
text: '<i class="fa fa-file-pdf-o"></i> PDF',
className: 'excelButton',
orientation: 'landscape',
title: 'Laporan Detail Karyawan',
pageSize: 'A4'
},
{ extend: 'excelHtml5',
text: '<i class="fa fa-file-excel-o"></i> EXCEL',
className: 'excelButton',
title: 'Laporan Detail Karyawan',
message: $('#printed').text()
}],
dom: {
container: {
className: 'dt-buttons'
},
button: {
className: 'btn btn-default'
}
}
},
"columnDefs": [ { "width": "5%", "targets": 0 } ]
});
});



this is my thead and the first row in here doest show up when i export it.


<thead>
<tr>
<th colspan="3">
<th colspan="2" style="text-align: center;">Saldo Awal</th>
<th colspan="2" style="text-align: center;">Terima</th>
<th>Rata</th>
<th colspan="2" style="text-align: center;">Keluar</th>
<th colspan="2" style="text-align: center;">Saldo Akhir</th>
</tr>
<tr>
<th>Kode Brg</th>
<th>Nama Brg</th>
<th>Satuan</th>
<th>Qty</th>
<th>Nominal</th>
<th>Qty</th>
<th>Nominal</th>
<th>Rata</th>
<th>Qty</th>
<th>Nominal</th>
<th>Qty</th>
<th>Nominal</th>
</tr>
</thead>



this one doest show up when i print it


<tr>
<th colspan="3">
<th colspan="2" style="text-align: center;">Saldo Awal</th>
<th colspan="2" style="text-align: center;">Terima</th>
<th>Rata</th>
<th colspan="2" style="text-align: center;">Keluar</th>
<th colspan="2" style="text-align: center;">Saldo Akhir</th>
</tr>



please helpp









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

6t5O89FLAzri,BvYqvfL1iQIPYa85XuGQGYyg 6wUa5,VnKUWlDPZVM3Q
LmEi N87FOUIMP0ly xbBnp4RWrDbVDRsaIqDgK2,x,0ck68tSLlXR962rJ,TBFfAccq,xQ3,KPNufT

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications