4
jQuery DataTablesに以下のPDFオプションを追加しました。 pdfが作成されます。オプション(ランドスケープおよびメッセージテキスト)は有効ではありません。jQuery DataTables PDFオプションが機能しない
$('#dataTable').dataTable({
"bStateSave": true,
"fnStateSave": function (oSettings, oData) {
localStorage.setItem('DataTables_'+window.location.pathname, JSON.stringify(oData));
},
"fnStateLoad": function (oSettings) {
return JSON.parse(localStorage.getItem('DataTables_'+window.location.pathname));
},
"sDom": 'CT<"clear">lfrtip',
"oColVis": {
"buttonText": "Show/Hide",
"aiExclude": [ 0 ],
"bRestore": true,
"sAlign": "left"
},
"oTableTools": {
"aButtons": [
{
"sExtends": "xls",
"sButtonText": "Excel",
"mColumns": "visible"
},
{
"sExtends": "pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Service Request System",
"mColumns": "visible"
}
],
"sSwfPath": "/swf/copy_cvs_xls_pdf.swf"
}