Multi-line pdfmessage
Multi-line pdfmessage
bwalker
Posts: 3Questions: 0Answers: 0
I'm using TableTools and trying to add a message to the pdf when exporting the data. I'd like to have a multi-line message. Unfortunately, when I use either \n or \r\n, I only get the first line.
Here's a simplified version of what I'm working with:
[code]
$ReportTable = $("#ReportTable").
sSelectionMode: 'single',
sDom: '<"$grid-toolbar"sFT>tr<"dataTables-footer"ilp>',
oTableTools: {
sSwfPath: config.nonAjaxUrls.zeroClipboardSwf,
aButtons: [
"csv", // has custom code but is irrelevant for this example
"xls", // has custom code but is irrelevant for this example,
{
sExtends: "pdf",
sButtonText: jsText.SaveAsPdf,
sPdfOrientation: "landscape",
sFileName: "Report.pdf",
sPdfMessage: line1Value + "\n" + line2Value
},
"print" // has custom code but is irrelevant for this example
]
},
sAjaxSource: (ajaxSources.AjaxGetReportData),
fnServerData: reportTableServerSide,
aoColumns: [
// columns defined here
]
});
[/code]
Any ideas?
Here's a simplified version of what I'm working with:
[code]
$ReportTable = $("#ReportTable").
sSelectionMode: 'single',
sDom: '<"$grid-toolbar"sFT>tr<"dataTables-footer"ilp>',
oTableTools: {
sSwfPath: config.nonAjaxUrls.zeroClipboardSwf,
aButtons: [
"csv", // has custom code but is irrelevant for this example
"xls", // has custom code but is irrelevant for this example,
{
sExtends: "pdf",
sButtonText: jsText.SaveAsPdf,
sPdfOrientation: "landscape",
sFileName: "Report.pdf",
sPdfMessage: line1Value + "\n" + line2Value
},
"print" // has custom code but is irrelevant for this example
]
},
sAjaxSource: (ajaxSources.AjaxGetReportData),
fnServerData: reportTableServerSide,
aoColumns: [
// columns defined here
]
});
[/code]
Any ideas?
This discussion has been closed.
Replies
Allan