Can I modify Datatables PDF button to print table info and in landscape? -
i have print, pdf , excel buttons on datatable. table has quite few columns, there way create pdf in landscape? also, there way print table info (re: showing x y of z)?
i'm assuming you're using tabletools extension datatables enable saving pdf. if not, , use it. there, it's pretty simple. here's example:
with tabletools extension:
"tabletools": { { "sextends":"pdf", "spdforientation": "landscape", } }
with buttons extension (datatables 1.10.8+):
$('#mytable').datatable( { buttons: [ { extend: 'pdf', text: 'save pdf', exportoptions: { modifier: { orientation:'landscape' } } } ] } );
Comments
Post a Comment