New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 890058 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 29
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Printing PDFs with N-up enabled does not center the contents

Project Member Reported by thestig@chromium.org, Sep 27

Issue description

Chrome Version: 71.0.3559.0 / r559595
OS: Desktop platforms

What steps will reproduce the problem?

If necessary:
(1) Go to chrome://flags
(2) Turn on "Enable new Print Preview UI"
(3) Turn on "Enable N-up printing"
(4) Restart the browser

Then:
Then:
(5) Navigate to https://www.irs.gov/pub/irs-pdf/fw4.pdf
(6) Print
(7) Select a printer with a non-symmetrical printable area. e.g. Bottom margin is bigger than the top margin.
(8) Set "Pages Per Sheet" to 4 in the left pane.
(9) Wait for the updated print preview to render.

What is the expected result?

The N-up preview should be centered, like for HTML content. See attached symmetrical.png.

What happens instead?

The N-up preview uses all of the available printable area, so it is not centered. See attached printable_area.png.
 
symmetrical.png
335 KB View Download
printable_area.png
385 KB View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 28

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

commit 3d64dc689fb4ae66cfb725c767d4a3ce74c3c8d3
Author: Lei Zhang <thestig@chromium.org>
Date: Fri Sep 28 17:08:36 2018

Move GetSymmetricalPrintableArea() to printing/.

Move the function from PrintPreviewMessageHandler in chrome/ to
PageSetup in printing/, so it can be used by printing code outside of
chrome/, e.g. in pdf/.

BUG= 890058 

Change-Id: Icb5969e8a948373056df00d06cdb2b002ce201c1
Reviewed-on: https://chromium-review.googlesource.com/1250129
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595125}
[modify] https://crrev.com/3d64dc689fb4ae66cfb725c767d4a3ce74c3c8d3/chrome/browser/printing/print_preview_message_handler.cc
[modify] https://crrev.com/3d64dc689fb4ae66cfb725c767d4a3ce74c3c8d3/chrome/browser/printing/print_preview_message_handler.h
[delete] https://crrev.com/bf494bc57116b13fbc0d8ac398133f99fbf26ea2/chrome/browser/printing/print_preview_message_handler_unittest.cc
[modify] https://crrev.com/3d64dc689fb4ae66cfb725c767d4a3ce74c3c8d3/chrome/test/BUILD.gn
[modify] https://crrev.com/3d64dc689fb4ae66cfb725c767d4a3ce74c3c8d3/printing/page_setup.cc
[modify] https://crrev.com/3d64dc689fb4ae66cfb725c767d4a3ce74c3c8d3/printing/page_setup.h
[modify] https://crrev.com/3d64dc689fb4ae66cfb725c767d4a3ce74c3c8d3/printing/page_setup_unittest.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 29

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

commit b479a1407f5668a5178c5adee0c6047273407546
Author: Lei Zhang <thestig@chromium.org>
Date: Sat Sep 29 05:40:30 2018

Merge two PDF N-up paths.

PDFiumPrint and PDFiumEngineExports both have code to create N-up PDFs.
Merge the two since they are nearly identical.

For the PDFiumPrint caller, make it do fit the page into a symmetrical
printable area, so N-up printing is consistent for PDF content and web
content.

BUG= 890058 

Change-Id: I933b899434f3a3cd2d853529696629aed18461e7
Reviewed-on: https://chromium-review.googlesource.com/1250162
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595303}
[modify] https://crrev.com/b479a1407f5668a5178c5adee0c6047273407546/pdf/pdfium/DEPS
[modify] https://crrev.com/b479a1407f5668a5178c5adee0c6047273407546/pdf/pdfium/pdfium_engine_exports.cc
[modify] https://crrev.com/b479a1407f5668a5178c5adee0c6047273407546/pdf/pdfium/pdfium_engine_exports.h
[modify] https://crrev.com/b479a1407f5668a5178c5adee0c6047273407546/pdf/pdfium/pdfium_print.cc
[modify] https://crrev.com/b479a1407f5668a5178c5adee0c6047273407546/pdf/pdfium/pdfium_print.h

Status: Fixed (was: Assigned)
Labels: Needs-Feedback
Tried verifying the fix on the build without fix #71.0.3559.0 and build with fix #71.0.3567.0 on Windows 7 by following steps as per comment #0, but unable to observe the difference between both builds.
Attached the screenshots for reference.
thestig@ - Could you please help in confirming the fix.

Thanks.!
71.0.3567.0.PNG
483 KB View Download
71.0.3559.0.PNG
511 KB View Download

Sign in to add a comment