codebytere

#47378: fix: silent printing of PDFs with webContents.print

Merged
Created: Jun 5, 2025, 4:23:50 PM
Merged: Jun 6, 2025, 9:19:09 PM
4 comments
Target: main

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

Release Notes

Notes: Fixed an issue where printing PDFs with webContents.print({ silent: true }) would fail.

Backports

35-x-y
Pending
Waiting for a manual backport
36-x-y
Pending
Waiting for a manual backport
37-x-y
Merged
PR Number
#47397
Merged At
Jun 7, 2025, 8:59:50 AM
Released In
v37.0.0-beta.4
Release 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