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"
}