PdfExportSettings
Configures the behavior and appearance of the PDF export operation.
Defines which data to export, file name, styling, and callbacks for customization.
Used as the configuration argument for the pdfExport method.
Props
The following table outlines the props for the PdfExportSettings:
| Name | Type | Default | Description |
|---|---|---|---|
| columns | Partial<ColumnProps>[] | undefined | Defines columns to be customized for PDF export. Overrides grid column properties for PDF generation including width, textAlign, headerText. Columns are matched by field name and merged with grid column definitions. Properties specified here take precedence over grid column properties. |
| customRange | undefined | Defines the custom row range when | |
| fileName | string | 'Grid.pdf' | File name for the exported PDF document. Determines the name used when the browser downloads the PDF file. |
| footerText | string | undefined | Text displayed in the PDF footer on each page. Supports placeholders for page numbers (e.g., Page 1 of 100). |
| headerText | string | undefined | Text displayed in the PDF header on each page. Useful for adding titles, report names, or other header information. |
| maxRowsWarningThreshold | number | undefined (no limit) | Maximum number of rows allowed before a warning is triggered. Prevents export of extremely large datasets that could generate very large PDF files. When the data length exceeds this threshold, the export operation throws an error. |
| onAfterPdfExport | (event: PdfExportAfterEvent) => void | undefined | Callback function triggered after the PDF export operation completes or fails. Provides information about the outcome and applied settings for post-export actions. |
| onBeforePdfExport | (event: PdfExportBeforeEvent<T>) => void | undefined | Callback function triggered before the PDF export operation begins.
Provides access to columns, data, and configuration for customization or cancellation.
Allows modification of |
| pageSize | string | 'A4' | Page size for the PDF document (e.g., |
| range | 'All' | Specifies which rows to include in the PDF export. Determines the data range sent to PDF generation. Available options:
| |
| theme | string | 'Material' | Theme to apply to the PDF styling. Defines colors, fonts, and overall appearance of the exported PDF. |