Skip to content

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

Merged
codebytere merged 1 commit into
42-x-yfrom
trop/42-x-y-bp-fix-prefill-native-print-dialog-options-on-macos-with-oop-printing-1775138819310
Apr 2, 2026
Merged

fix: prefill native print dialog options on macOS with OOP printing#50643
codebytere merged 1 commit into
42-x-yfrom
trop/42-x-y-bp-fix-prefill-native-print-dialog-options-on-macos-with-oop-printing-1775138819310

Conversation

@trop
Copy link
Copy Markdown
Contributor

@trop trop Bot commented Apr 2, 2026

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.

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
@trop trop Bot requested a review from a team as a code owner April 2, 2026 14:07
@trop trop Bot requested review from a team and codebytere April 2, 2026 14:07
@trop trop Bot added 42-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Apr 2, 2026
@codebytere codebytere merged commit bba4374 into 42-x-y Apr 2, 2026
75 of 76 checks passed
@codebytere codebytere deleted the trop/42-x-y-bp-fix-prefill-native-print-dialog-options-on-macos-with-oop-printing-1775138819310 branch April 2, 2026 18:49
@release-clerk
Copy link
Copy Markdown

release-clerk Bot commented Apr 2, 2026

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant