PrintSettings
Configures the behavior and appearance of the print operation. Defines which data to print, window dimensions, callbacks, and thresholds for validation. Used with print() method to customize print output.
Props
The following table outlines the props for the PrintSettings:
| Name | Type | Default | Description |
|---|---|---|---|
| customRange | undefined | Defines the custom row range when range is set to 'Custom'. Specifies the startRow and endRow indices (zero-based, inclusive). | |
| maxRowsWarningThreshold | number | undefined (no limit) | Maximum number of rows allowed before a warning is triggered. Prevents accidental printing of extremely large datasets that could freeze the browser. When data exceeds this threshold, print operation throws an error. |
| onAfterPrint | (event: PrintAfterEvent) => void | undefined | Callback function triggered after the print operation completes or fails. Provides information about the outcome and applied settings for post-print actions. |
| onBeforePrint | (event: PrintBeforeEvent<T>) => void | undefined | Callback function triggered before the print operation begins. Provides access to columns, data, and configuration for customization or cancellation. |
| range | 'All' | Specifies which rows to include in the print output. Determines the data range sent to the print window. Available options:
| |
| title | string | 'Print' | Title text displayed in the print window's document title and header. Used for document identification and appears in print preview. |
| windowHeight | number | 800 | Height of the print window in pixels. Determines the vertical size of the window that opens for printing. |
| windowWidth | number | 1200 | Width of the print window in pixels. Determines the horizontal size of the window that opens for printing. Affects the visible area and affects layout rendering. |