Hi Sinisa,
Thanks for contacting Syncfusion support.
Query #1: How to keep table header (NOT
DOCUMENT HEADER) on every exported pdf page.
Kindly refer to the below documentation which illustrates how to export the Grid
header on each pdf page.
Repeat column header on each page: https://ej2.syncfusion.com/react/documentation/grid/pdf-export/adding-header-and-footer/#repeat-column-header-on-every-page
Query #2: How to style table header for pdf
document ( NOT DOCUMENT HEADER)
By using pdfHeaderQueryCellInfo event, you can style the header
cell while exporting into pdf.
pdfHeaderQueryCellInfo: https://ej2.syncfusion.com/react/documentation/api/grid/#pdfheaderquerycellinfo
|
pdfHeaderQueryCellInfo(args) {
// repeat the grid header on
each page
args.cell.row.pdfGrid.repeatHeader = true;
// customize the style of PDF Grid header
var backColor = this.gridInstance.pdfExportModule.hexToRgb('#ff704d');
args.cell.style.backgroundBrush = new PdfSolidBrush(new PdfColor(backColor.r, backColor.g, backColor.b));
}
|
Sample: https://stackblitz.com/edit/react-fnd8e1?file=index.js
Please get back to us if you need further assistance.
Regards,
Rajapandiyan S