- Home
- Forum
- React - EJ 2
- Repeat column headers in Pivot Table custom PDF export
Repeat column headers in Pivot Table custom PDF export
I am using the following configuration, but I don't see any way to repeat the columns header on each page.
let pdfExportProperties = {
fileName: this.props.fileName + '.pdf' || 'pivot_table.pdf',
pageOrientation: 'Landscape',
header: {
fromTop: 0,
height: 20,
contents: [
{
type: 'Text',
value: (this.props.pdfTitle || 'Pivot Table') + moment(new Date()).format('DD-MM-YYYY HH:mm:ss'),
position: {x: 0, y: 0},
style: {textBrushColor: '#000000', fontSize: 15, dashStyle: 'Solid', hAlign: 'Center'},
},
],
},
footer: {
fromBottom: 0,
height: 20,
contents: [
{
type: 'PageNumber',
pageNumberType: 'Arabic',
format: '{$current} of {$total}',
position: {x: 0, y: 0},
style: {textBrushColor: '#02007a', fontSize: 13},
},
],
},
}
this.pivotObj.pdfExport(pdfExportProperties)
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
MM
Manikandan Murugesan
Syncfusion Team
December 9, 2021 07:23 AM UTC
Hi Gonzalo,
To repeat the column headers on each page, please enable the "repeatHeader" property in the "pdfHeaderQueryCellInfo" event. Please see the code example below.
Code Example:
|
<PivotViewComponent
gridSettings={{
pdfHeaderQueryCellInfo: this.pdfHeaderQueryCellInfo.bind(this),
}}
>
</PivotViewComponent>
pdfHeaderQueryCellInfo(args) {
args.cell.row.pdfGrid.repeatHeader = true;
} |
Meanwhile, we have prepared a sample for your reference. Please find it from below link.
Please let us know if you have any concerns.
Regards,
Manikandan
Marked as answer
GU
GUU
December 9, 2021 11:21 PM UTC
Thanks it worked.
MM
Manikandan Murugesan
Syncfusion Team
December 10, 2021 04:47 AM UTC
Hi Gonzalo,
Please let us know if you have any other queries. We are always happy to assist you.
Regards,
Manikandan
SIGN IN To post a reply.