const printPluginInstance = printPlugin(props?: PrintPluginProps);
The `printPlugin()`
function takes an optional `PrintPluginProps`
parameter that consists of the following property:
(? denotes an optional property)
Property | Type | Description | From |
---|
`enableShortcuts` ? | `boolean` | Enable shortcuts | 2.6.0 |
`renderProgressBar` | `Function` | Customize the progress bar when preparing pages to print. See this example | 3.6.0 |
`setPages` ? | `Function` | Set target pages that will be printed. See this example | 3.6.0 |
By default, the shortcut is enabled. Users can press `ctrl`
+ `P`
to print the current document.
The plugin instance `printPluginInstance`
provides the following properties:
Property | Type | Description | From |
---|
`print` | `Function` | Print the current document. See this example | 3.6.0 |
`Print` | `ReactElement` | Customizable print button | 2.0.0 |
`PrintButton` | `ReactElement` | The default print button | 2.0.0 |
`PrintMenuItem` | `ReactElement` | The default print menu item | 2.5.0 |