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

Issue 873840 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

PDF printing rendering issue with portrait/landscape mix

Project Member Reported by vkhabarov@chromium.org, Aug 13

Issue description

Chrome version: 
On Mac OS: 68.0.3440.106 
On Chrome OS 67.0.3396.99 
On Windows 10: 68.0.3440.106 
Case#: 16576224

Description:
PDF document shows without issues in Chrome Browser, but when trying to print, preview shows 11 blank pages in portrait mode and 2 pages with content in landscape mode and prints blank pages except last two. Selecting "print as image" shows content for pages, with correct orientation - first page portrait, all others landscape
Other browsers do not have this issue.


Steps to reproduce: 
1. Open attached PDF document
2. Open print dialog

Current Behavior / Reproduction: 
11 blank portrait pages and two with content

Expected Behavior:
1 portrait page and 12 landscape, all with content 

Drive link to logs: 
PDF - 
https://drive.google.com/open?id=1BD_AD6-4D-RRjSAJ6n5CQXl6IkhvS9MS
Screenshots - 
https://drive.google.com/open?id=19bSnNctaN9NZ4ISglRSr4yZrYjI-ffra
 
Owner: vkhabarov@chromium.org
Victor, does the issue repro in older browser versions? If it does not can we get a bisect? Please re-assign to me once these details are complete.
I think this did regress. I can try bisecting.
Cc: xlou@chromium.org
Labels: -Type-Bug -M-68 FoundIn-68 FoundIn-69 Type-Bug-Regression
Owner: ----
Bisects to https://chromium.googlesource.com/chromium/src/+log/4fdf6637..7a37173e

Likely r553428 changed the PDF transformations.
I will take a closer look at the PDF.  Theoretically, when pagesPerSheet == 1, it should work as it used to be before the change.
r553428 got reverted and relanded as r554188. It changed the PDF transformation from [fit to page, flatten] to [flatten, fit to page]. The change fixed the PDF in  bug 409670 , but breaks this PDF.
I see.
Status: Available (was: Untriaged)
Hi team, do we have an update for the customer that I can give? Thanks! 
Labels: M-71
Owner: thestig@chromium.org
Status: Assigned (was: Available)
We'll aim to fix this in M71, and maybe expedite the fix by merging to M70.
Cc: thestig@chromium.org vkasatkin@google.com
 Issue 882007  has been merged into this issue.
Labels: M-70
Status: Started (was: Assigned)
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 21

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

commit 668ba31194b023eef3c90930fa842c4e6d62f001
Author: Lei Zhang <thestig@chromium.org>
Date: Fri Sep 21 18:13:54 2018

Fix PDF printing for mixed page sizes and annotations.

PDF contents have to be fit into the printable area before the PDF gets
flattened for printing. Otherwise some PDFs will not print correctly.
r554188 flipped the ordering, so this flips it back.

BUG= 873840 

Change-Id: I68a05d0951caa31080b3b9bb424d458a899b92a7
Reviewed-on: https://chromium-review.googlesource.com/1237719
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593258}
[modify] https://crrev.com/668ba31194b023eef3c90930fa842c4e6d62f001/pdf/pdfium/pdfium_print.cc

Status: Fixed (was: Started)
We will be able to see the fix in 71.0.3559.0 or newer. i.e. With Chrome Canary early next week. Once we verify the fix, I will look into merging it to M70.
Cc: vamshi.kommuri@chromium.org
Labels: Needs-Feedback
Tried checking the issue on chrome version 71.0.3559.0 using Mac 10.13.1 as per comment#0. As we do not have permission to access the drive link(s) provided in C#0, we couldn't proceed further to test and verify the fix.

@Lei Zhang: Requesting you to help us in verifying the fix, either by providing test file/PDF or by giving access to the drive link.

Thanks!
Labels: -Needs-Feedback
I hand-wrote a PDF for testing. See attached good_bad.pdf. If you try a good build, the print preview should be "Good :]" just like the displayed PDF. In bad builds, the print preview will show "Bad :[" or possibly blank.
good_bad.pdf
953 bytes Download
Issue 888557 has been merged into this issue.
Status: Assigned (was: Fixed)
As per comment#15, checked the issue on chrome version 71.0.3559.6 using the test file provided i.e., good_bad.pdf. Yet we were are to see the result as "Bad :[" in print preview. Attaching the screenshot for reference. Changing the status to "Assigned" for further inputs/action on this.

Thanks!
873840 good bad.png
347 KB View Download
Status: Fixed (was: Assigned)
The destination needs to be a real printer. With the "Save as PDF" destination, the result has always bad. That did not regress. I'll file a new bug for that separately.
I filed bug 889099 for the "Save as PDF" destination case. Please retest with a printer selected as the destination.
vamshi.kommuri: Can you retest for the case where the destination is a printer?
As per comment#18 & #20, tried checking the issue by changing the destination to a printer, we were able to see the expected behaviour i.e., "Good :]" using Chrome version 71.0.3559.6 on windows 7 and Ubuntu 14.04. Attaching the screen shot of the same for reference.
Note: Couldn't verify the same on Mac as we do not have printer connection/access.

Thanks!
873840 CL.PNG
128 KB View Download
Labels: Merge-Request-70
Thanks for checking. Requesting merge to M70.
Project Member

Comment 23 by sheriffbot@chromium.org, Sep 28

Labels: -Merge-Request-70 Merge-Review-70 Hotlist-Merge-Review
This bug requires manual review: M70 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

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

Comment 25 by bugdroid1@chromium.org, Sep 28

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e9bc6baa529a36971aa0050e46e21b1dfa1fa3fd

commit e9bc6baa529a36971aa0050e46e21b1dfa1fa3fd
Author: Lei Zhang <thestig@chromium.org>
Date: Fri Sep 28 17:48:43 2018

M70: Fix PDF printing for mixed page sizes and annotations.

PDF contents have to be fit into the printable area before the PDF gets
flattened for printing. Otherwise some PDFs will not print correctly.
r554188 flipped the ordering, so this flips it back.

BUG= 873840 
TBR=thestig@chromium.org

(cherry picked from commit 668ba31194b023eef3c90930fa842c4e6d62f001)

Change-Id: I68a05d0951caa31080b3b9bb424d458a899b92a7
Reviewed-on: https://chromium-review.googlesource.com/1237719
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#593258}
Reviewed-on: https://chromium-review.googlesource.com/1252014
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#738}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/e9bc6baa529a36971aa0050e46e21b1dfa1fa3fd/pdf/pdfium/pdfium_print.cc

Labels: Merge-Merged-70-3538
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/e9bc6baa529a36971aa0050e46e21b1dfa1fa3fd

Commit: e9bc6baa529a36971aa0050e46e21b1dfa1fa3fd
Author: thestig@chromium.org
Commiter: thestig@chromium.org
Date: 2018-09-28 17:48:43 +0000 UTC

M70: Fix PDF printing for mixed page sizes and annotations.

PDF contents have to be fit into the printable area before the PDF gets
flattened for printing. Otherwise some PDFs will not print correctly.
r554188 flipped the ordering, so this flips it back.

BUG= 873840 
TBR=thestig@chromium.org

(cherry picked from commit 668ba31194b023eef3c90930fa842c4e6d62f001)

Change-Id: I68a05d0951caa31080b3b9bb424d458a899b92a7
Reviewed-on: https://chromium-review.googlesource.com/1237719
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#593258}
Reviewed-on: https://chromium-review.googlesource.com/1252014
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#738}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
Able to verify the issue as per comment#18 on chrome version 70.0.3538.45 using Windows 7 and Ubuntu 14.04 i.e., "Good :]" is seen in Print Preview. Attaching the screen shot of the same for reference.
Note: Couldn't verify the same on Mac as we do not have printer connection/access.

Thanks!
873840 Beta.png
139 KB View Download

Sign in to add a comment