Multi-line pdfmessage

Multi-line pdfmessage

bwalkerbwalker Posts: 3Questions: 0Answers: 0
edited September 2013 in TableTools
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?

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Currently this isn't possible. Sorry. I will ensure that it is in TableTools.next when I'll use a JSON format for that message, but at the moment you'd need to hack the source.

    Allan
  • bwalkerbwalker Posts: 3Questions: 0Answers: 0
    No worries. The message should be okay with a single line too. Thanks for the quick reply (:
This discussion has been closed.