2016-03-02 50 views
1

我有一些代碼來導出數據表pdfhtml這樣如何設置值中心在每列出口數據表pdfhtml

$('#example3').DataTable({ 
    dom: 'lBfrtip', 
    buttons: [ 
     { 
     extend: 'pdfHtml5', 
     title: 'Data Cucian Kain Cartiva '+d, 
     orientation:'portrait', 
     download: 'open', 
     orientation:'landscape', 
     customize: function(doc) { 
      doc.content.forEach(function(item) { 
      if (item.table) { 
       item.table.widths = [40, 40, '*','*','*'] 
      } 
      }) 
     } 
     } 
    ] 
}); 

,並導致這樣 enter image description here 我想每一列中的數據是在中心,而不是在左邊。

該怎麼辦?

回答

相關問題