Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: honor pageRanges when printing #25064

Merged
merged 8 commits into from Aug 28, 2020
Merged

fix: honor pageRanges when printing #25064

merged 8 commits into from Aug 28, 2020

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Aug 20, 2020

Description of Change

Closes #25013.

The print ranges in Chromium's print job settings were not being properly
plumbed through to various platforms' UI through the correct codepaths.
This fixes that by setting them should they exist.

Upstream CL open at https://chromium-review.googlesource.com/c/chromium/src/+/2380886

On macOS Screen Shot 2020-08-20 at 9 35 33 PM
On Linux Screen Shot 2020-08-20 at 9 26 23 PM
On Windows

2020-08-27T16_03_38-Screenshot-478x430

Tested with https://gist.github.com/0c1c8affb9262ae83bde4d08d3401f0c.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines
  • PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
  • This is NOT A BREAKING CHANGE. Breaking changes may not be merged to master until 11-x-y is branched.

Release Notes

Notes: Fixed an issue where pageRanges was not properly honored when printing.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 20, 2020
@codebytere codebytere changed the title fix: honor pageRanges when printing fix: honor pageRanges when printing on macOS Aug 20, 2020
@codebytere codebytere changed the title fix: honor pageRanges when printing on macOS fix: honor pageRanges when printing Aug 20, 2020
@codebytere codebytere force-pushed the pageranges-printing branch 9 times, most recently from ccf6f05 to f40eac9 Compare August 21, 2020 15:36
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 21, 2020
@codebytere codebytere marked this pull request as ready for review August 21, 2020 21:20
@codebytere codebytere requested a review from a team as a code owner August 21, 2020 21:20
Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this PR on Windows 10 with the sample code at https://gist.github.com/0c1c8affb9262ae83bde4d08d3401f0c and the ranges are working as expected 👍

Note about the screenshot: the Windows screenshot reads "1-3" rather than "1-4" as in e.g. the Linux screenshot, but there are indeed only 3 pages on Windows and so the pageRange is correct.

@codebytere codebytere merged commit a4b6fce into master Aug 28, 2020
@release-clerk
Copy link

release-clerk bot commented Aug 28, 2020

Release Notes Persisted

Fixed an issue where pageRanges was not properly honored when printing.

@trop
Copy link
Contributor

trop bot commented Sep 23, 2020

@codebytere has manually backported this PR to "10-x-y", please check out #25597

@trop
Copy link
Contributor

trop bot commented Sep 23, 2020

@codebytere has manually backported this PR to "11-x-y", please check out #25600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

webContents.print()'s pageRanges property is not honored
4 participants