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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -