feat: allow defaulting to printer default page size (#49523)

Co-authored-by: Edvan de Matos <edvan.santos@querodelivery.com>
This commit is contained in:
Shelley Vohr
2026-02-13 13:40:14 +01:00
committed by GitHub
parent 3a5f9e0a33
commit dcdbb0397e
7 changed files with 162 additions and 65 deletions

View File

@@ -588,6 +588,7 @@ Stops any `findInPage` request for the `webview` with the provided `action`.
* `footer` string (optional) - string to be printed as page footer.
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`,
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` in microns.
* `usePrinterDefaultPageSize` boolean (optional) - Whether to use the system's default page size. Default is `false`. Cannot be combined with `pageSize`. When `deviceName` is provided, uses the default page size of that specific printer. When `deviceName` is not provided, uses the default page size of the system's default printer. If the printer's default page size cannot be retrieved, falls back to A4 (210mm x 297mm).
Returns `Promise<void>`