Problem saving multiple tables to PDF
Problem saving multiple tables to PDF
wdupree
Posts: 5Questions: 0Answers: 0
Hey everyone, hoping someone can help me. I'm trying to get the export to save multiple datatables to PDF. It works for Copy (to clipboard), CSV and Excel - but when I click on the PDF button - it does nothing, no error, no message - nothing. Here's the code for the PDF extend:
[code]
{
"sExtends": "pdf",
"sFileName": "*.pdf",
"bFooter": true,
"sPdfSize": "letter",
"sToolTip": "Save as PDF in Portrait orientation",
"mColumns": "visible",
"fnClick": function (nButton, oConfig, flash) {
var s = stripCarriageReturns(stripMultipleSpaces(stripHTMLTags($('.ReportHeader').html()))) + "\n";
var a = TableTools.fnGetMasters();
for (var i = 0, iLen = a.length; i < iLen - 1; i++) {
s += a[i].that.fnGetTableData(oConfig) + "\n";
}
this.fnSetText(flash, s);
}
},
[/code]
It may also be worth noting that if I use Firebug and break at the fnSetText function that "s" has all of the text it should from all of the tables on the page (it's not null or empty). Anyone have any ideas? Thanks in advance.
[code]
{
"sExtends": "pdf",
"sFileName": "*.pdf",
"bFooter": true,
"sPdfSize": "letter",
"sToolTip": "Save as PDF in Portrait orientation",
"mColumns": "visible",
"fnClick": function (nButton, oConfig, flash) {
var s = stripCarriageReturns(stripMultipleSpaces(stripHTMLTags($('.ReportHeader').html()))) + "\n";
var a = TableTools.fnGetMasters();
for (var i = 0, iLen = a.length; i < iLen - 1; i++) {
s += a[i].that.fnGetTableData(oConfig) + "\n";
}
this.fnSetText(flash, s);
}
},
[/code]
It may also be worth noting that if I use Firebug and break at the fnSetText function that "s" has all of the text it should from all of the tables on the page (it's not null or empty). Anyone have any ideas? Thanks in advance.
This discussion has been closed.
Replies
Allan
You weren't kidding! I got everything working but it took a lot more changes than I thought. I PMed you to see if I could send you all the changes so they might be incorporated in to future versions. Thanks for all the help!