New issue
Advanced search Search tips

Issue 686384 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Bug with Print Scaling - Issue 96456

Reported by j...@souvestre.com, Jan 28 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36

Steps to reproduce the problem:
1. Ctrl-P
2. Click on "More Settings"
3. Scale - Set to 90% or 110%
4. Print

What is the expected behavior?
The printed copy should match the preview screen

What went wrong?
The printed copy doesn't match the preview screen.  The font size seems fine, but the margins are messed up.  For 90% the left and top margins are way too big and text is pushed off (and lost) to the right and bottom.  For 110% the left and top margins are too big, but not as bad as for 90%.

Did this work before? N/A 

Chrome version: 56.0.2924.76  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 24.0 r0

The test I ran was to print just the 1st page at https://golang.org/ref/spec.  If you can't duplicate the problem I can scan my prints to PDF's and attach them.
 
Labels: Needs-Triage-M56
Labels: Prestable-56.0.2924.76
Components: -UI Internals>Printing
Owner: rbpotter@chromium.org
Status: Started (was: Unconfirmed)
Was able to reproduce this. The problem seems to be Windows only, and I was only able to duplicate it using local (vs cloud) printers. Found the issue, should have a fix in today or tomorrow.
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8f96566d8d7d712d4d11ca04e4f3641048362276

commit 8f96566d8d7d712d4d11ca04e4f3641048362276
Author: rbpotter <rbpotter@chromium.org>
Date: Wed Feb 01 23:55:38 2017

Fix windows margin scaling bug

When printing to local printers Windows uses the computed page size.
Page size is scaled when using print scaling to force blink to reflow
the page. Need to unscale the page size before sending it back to
Windows so that Windows knows the correct page size.

BUG= 686384 

Review-Url: https://codereview.chromium.org/2667793002
Cr-Commit-Position: refs/heads/master@{#447647}

[modify] https://crrev.com/8f96566d8d7d712d4d11ca04e4f3641048362276/components/printing/renderer/print_web_view_helper.cc

Labels: Merge-Request-57
Status: Fixed (was: Started)
This is now fixed on the latest Canary (58.0.3000.0).
Project Member

Comment 6 by sheriffbot@chromium.org, Feb 3 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 7 by bugdroid1@chromium.org, Feb 3 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/97411fe06ea6c9f953b5944b73eb7920999df16b

commit 97411fe06ea6c9f953b5944b73eb7920999df16b
Author: rbpotter <rbpotter@chromium.org>
Date: Fri Feb 03 23:04:38 2017

Fix windows margin scaling bug

When printing to local printers Windows uses the computed page size.
Page size is scaled when using print scaling to force blink to reflow
the page. Need to unscale the page size before sending it back to
Windows so that Windows knows the correct page size.

BUG= 686384 

Review-Url: https://codereview.chromium.org/2667793002
Cr-Commit-Position: refs/heads/master@{#447647}
(cherry picked from commit 8f96566d8d7d712d4d11ca04e4f3641048362276)

Review-Url: https://codereview.chromium.org/2674913004 .
Cr-Commit-Position: refs/branch-heads/2987@{#305}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/97411fe06ea6c9f953b5944b73eb7920999df16b/components/printing/renderer/print_web_view_helper.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Feb 24 2017

Project Member

Comment 9 by bugdroid1@chromium.org, Feb 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5378c93cfa61880bb755fff32f231fcf06cc8dd2

commit 5378c93cfa61880bb755fff32f231fcf06cc8dd2
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Fri Feb 24 05:38:15 2017

Revert of Add automated testing to check for page size with scaling (patchset #4 id:60001 of https://codereview.chromium.org/2697683004/ )

Reason for revert:
Looks like this causes build bot errors:  crbug.com/695760 

Original issue's description:
> Add automated testing to check for page size with scaling
>
> Ensure correct page size is still passed back with non default scaling
> values - see  bug 686384 . Also, modify print web view helper to prevent
> any rounding errors from converting dpi -> pixels -> dpi and scaling
> and unscaling.
>
> BUG= 686384 
>
> Review-Url: https://codereview.chromium.org/2697683004
> Cr-Commit-Position: refs/heads/master@{#452737}
> Committed: https://chromium.googlesource.com/chromium/src/+/230c3f1c820ccb738e9715cd45b2b5e049d782d7

TBR=thestig@chromium.org,rbpotter@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 686384 

Review-Url: https://codereview.chromium.org/2718513003
Cr-Commit-Position: refs/heads/master@{#452763}

[modify] https://crrev.com/5378c93cfa61880bb755fff32f231fcf06cc8dd2/components/printing/renderer/print_web_view_helper.cc
[modify] https://crrev.com/5378c93cfa61880bb755fff32f231fcf06cc8dd2/components/printing/test/mock_printer.cc
[modify] https://crrev.com/5378c93cfa61880bb755fff32f231fcf06cc8dd2/components/printing/test/mock_printer.h
[modify] https://crrev.com/5378c93cfa61880bb755fff32f231fcf06cc8dd2/components/printing/test/print_mock_render_thread.cc
[modify] https://crrev.com/5378c93cfa61880bb755fff32f231fcf06cc8dd2/components/printing/test/print_web_view_helper_browsertest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Feb 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b79284c64bbefedf7b9eee4caf42f47f38316733

commit b79284c64bbefedf7b9eee4caf42f47f38316733
Author: treib <treib@chromium.org>
Date: Fri Feb 24 12:55:10 2017

Reland of Add automated testing to check for page size with scaling (patchset #1 id:1 of https://codereview.chromium.org/2718513003/ )

Reason for revert:
Turns out the original CL was not the cause of the flakiness.

Original issue's description:
> Revert of Add automated testing to check for page size with scaling (patchset #4 id:60001 of https://codereview.chromium.org/2697683004/ )
>
> Reason for revert:
> Looks like this causes build bot errors:  crbug.com/695760 
>
> Original issue's description:
> > Add automated testing to check for page size with scaling
> >
> > Ensure correct page size is still passed back with non default scaling
> > values - see  bug 686384 . Also, modify print web view helper to prevent
> > any rounding errors from converting dpi -> pixels -> dpi and scaling
> > and unscaling.
> >
> > BUG= 686384 
> >
> > Review-Url: https://codereview.chromium.org/2697683004
> > Cr-Commit-Position: refs/heads/master@{#452737}
> > Committed: https://chromium.googlesource.com/chromium/src/+/230c3f1c820ccb738e9715cd45b2b5e049d782d7
>
> TBR=thestig@chromium.org,rbpotter@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG= 686384 
>
> Review-Url: https://codereview.chromium.org/2718513003
> Cr-Commit-Position: refs/heads/master@{#452763}
> Committed: https://chromium.googlesource.com/chromium/src/+/5378c93cfa61880bb755fff32f231fcf06cc8dd2

TBR=thestig@chromium.org,rbpotter@chromium.org,hajimehoshi@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 686384 

Review-Url: https://codereview.chromium.org/2719443003
Cr-Commit-Position: refs/heads/master@{#452801}

[modify] https://crrev.com/b79284c64bbefedf7b9eee4caf42f47f38316733/components/printing/renderer/print_web_view_helper.cc
[modify] https://crrev.com/b79284c64bbefedf7b9eee4caf42f47f38316733/components/printing/test/mock_printer.cc
[modify] https://crrev.com/b79284c64bbefedf7b9eee4caf42f47f38316733/components/printing/test/mock_printer.h
[modify] https://crrev.com/b79284c64bbefedf7b9eee4caf42f47f38316733/components/printing/test/print_mock_render_thread.cc
[modify] https://crrev.com/b79284c64bbefedf7b9eee4caf42f47f38316733/components/printing/test/print_web_view_helper_browsertest.cc

Sign in to add a comment