Skip to content

PrintConfig

Configuration options for the print plugin

PropertyTypeDescription
button?booleanShow print button in toolbar (default: false) When true, adds a print icon to the grid toolbar
orientation?PrintOrientationPage orientation (default: ‘landscape’) Grids typically print better in landscape
warnThreshold?numberShow a confirmation dialog when row count exceeds this threshold (default: 500)
maxRows?numberMaximum rows to print (default: 0 = unlimited)
includeTitle?booleanInclude grid title in print output (default: true) Uses shell.header.title if available
includeTimestamp?booleanInclude timestamp in print footer (default: true)
title?stringCustom print title (overrides shell title)
isolate?booleanPrint in isolation mode (default: false)

Show a confirmation dialog when row count exceeds this threshold (default: 500)

When the number of rows to print exceeds this value, the user is shown a confirmation dialog asking if they want to proceed. This gives users a chance to cancel before a potentially slow print operation.

Set to 0 to disable the warning dialog.

Note: This only shows a warning - it does NOT limit the rows printed. Use maxRows to actually limit the output.

// Warn at 500+ rows, but allow printing all if confirmed
new PrintPlugin({ warnThreshold: 500 })
// Warn at 1000+ rows AND limit to 500 rows max
new PrintPlugin({ warnThreshold: 1000, maxRows: 500 })

Maximum rows to print (default: 0 = unlimited)

When set to a positive number, only the first N rows will be printed. This is a hard limit - excess rows are not rendered regardless of user choice.

Use warnThreshold to show a confirmation dialog instead of hard-limiting.

// Hard limit to 100 rows (no warning, just limits)
new PrintPlugin({ maxRows: 100 })
// Warn at 500+ AND hard limit to 1000
new PrintPlugin({ warnThreshold: 500, maxRows: 1000 })

AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt