Skip to content

fix: prefill native print dialog options on macOS with OOP printing#51682

Merged
jkleinsc merged 1 commit into
41-x-yfrom
fix/print-prefill-macos--41-x-y
May 19, 2026
Merged

fix: prefill native print dialog options on macOS with OOP printing#51682
jkleinsc merged 1 commit into
41-x-yfrom
fix/print-prefill-macos--41-x-y

Conversation

@ckerr

@ckerr ckerr commented May 18, 2026

Copy link
Copy Markdown
Member

Manual backport of #50600. See that PR for details.

Notes: Fixed an issue where custom options in webContents.print() did not prefill the print dialog on macOS.

Chromium enabled out-of-process (OOP) printing by default on macOS in
https://chromium-review.googlesource.com/c/chromium/src/+/6032774. This
broke webContents.print() option prefilling (e.g. copies, collate,
duplex) in two ways:

1. ScriptedPrint() silently aborted because RegisterSystemPrintClient()
   was only called from GetDefaultPrintSettings(), but Electron's flow
   calls UpdatePrintSettings() instead when options are provided.

2. PrinterQueryOop::UpdatePrintSettings() sends settings to the remote
   PrintBackend service, but on macOS the native dialog runs in-browser
   using the local PrintingContextMac::print_info_, which was never
   updated with the user's requested settings.

Fix by registering the system print client in UpdatePrintSettings() and
applying cached settings to the local printing context before showing
the in-browser system print dialog.

Notes: Fixed webContents.print() option prefilling (copies, collate, duplex) on macOS when OOP printing is enabled.
@ckerr ckerr requested a review from a team as a code owner May 18, 2026 20:37
@ckerr ckerr added backport This is a backport PR no-backport 41-x-y labels May 18, 2026
@trop trop Bot added the semver/patch backwards-compatible bug fixes label May 18, 2026
@jkleinsc jkleinsc merged commit 53ba3b2 into 41-x-y May 19, 2026
118 of 122 checks passed
@jkleinsc jkleinsc deleted the fix/print-prefill-macos--41-x-y branch May 19, 2026 21:01
@release-clerk

release-clerk Bot commented May 19, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed an issue where custom options in webContents.print() did not prefill the print dialog on macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

41-x-y backport This is a backport PR no-backport semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants