Reputation: 103
I am using PrimeFaces 6.1. I am trying to export a dataTable with footer using the dataExporter component. The footer is correctly exported for CSV and XLS formats but for PDF it simply refuses to include it. Tried using both p:column's footerText and f:facet footer and got the same behavior.
I also tried switching to PrimeFaces Extensions exporter and it finally included the footer in the PDF export but also some raw HTML from the table's columns that I don't know how to exclude (e.g. HTML used to display some font awesome icons...). I would prefer to continue using the Primefaces' dataExporter since it already exports the data correctly (only text) but make it export the footer as well.
Any ideas on how to make it work?
Upvotes: 2
Views: 1069
Reputation: 413
Recently I struggled to achieve footer facet columns in CSV export.
The solution was: Usage of
<p:column footerText="..."...
There are also attributes exportHeaderValue
and exportFooterValue
to override UI values in the export result.
This way the footer content showed up in the UI and via dataExporter in CSV and PDF.
Upvotes: 0