#47378: fix: silent printing of PDFs with webContents.print
Merged
Description of Change
Closes #47272.
Fixes an issue where printing PDFs with webContents.print({ silent: true })
would fail. This happened after the switch to OOP owing to this code which tried to composite any modifiable jobs. Under non-silent circumstances, calls to get settings from the user correctly set any non-html jobs to non-modifiable, but this logic was bypassed in silent printing and so PDF jobs were mistakenly marked modifiable.
Checklist
- PR description included and stakeholders cc'd
-
npm test
passes - PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed an issue where printing PDFs with webContents.print({ silent: true })
would fail.
Backports
35-x-y
PendingWaiting for a manual backport
36-x-y
PendingWaiting for a manual backport
37-x-y
MergedPR Number
#47397Merged At
Jun 7, 2025, 8:59:50 AM
Released In
v37.0.0-beta.4Release Date
Jun 9, 2025, 6:43:04 PM
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron