New issue
Advanced search Search tips

Issue 820143 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug



Sign in to add a comment

PDFs don't print from System Dialog on Canary

Project Member Reported by rbpotter@chromium.org, Mar 8 2018

Issue description

Chrome Version: 67.0.3365.0
OS: Win10

What steps will reproduce the problem?
(1) Open a PDF in Chrome
(2) Ctrl + Shift + P to print with the system dialog
(3) Print to e.g. Microsoft XPS Document Writer

What is the expected result?
Can open saved xps file after print completes.

What happens instead?
Print never completes. File shows up in "Recent files" in explorer but cannot be opened (get "File Not Found" error in XPS viewer).

Printing HTML documents works (both system dialog and print preview). Printing PDFs from print preview works.

This works in Beta (65.0.3325.125). Will test in Dev shortly.
 
Labels: M-67 ReleaseBlock-Beta
Works on Dev - 66.0.3355.0. So this is a recent break. This should probably block Beta as I can consistently repro on 2 different Win10 machines with both XPS document writer and other printers. Some users run Chrome with Print Preview disabled and they will not be able to print PDFs.

Will bisect shortly.
Oddly, this doesn't seem to reproduce for me on Chromium builds.
Cc: weili@chromium.org
Labels: -ReleaseBlock-Beta -M-67 M-66
Narrowed this down to breaking between 66.0.3357.0 and 66.0.3358.0. It is broken on latest Dev channel 66.0.3359.22, so updating label to M66. Removing release blocker for now.

There are only 4 printing related changes between the two releases. One is related only to the new print preview UI, which is behind a flag, and two more are a revert + corresponding reland. These are unlikely to be the issue, which leaves 

https://chromium.googlesource.com/chromium/src/+/7a969ba89ccf51784f525b3aad82a813474c56fb%5E%21/#F2

Based on that CL, I tried testing a Chromium build, 67.0.3365.0, with the --isolate-origins flag. This flag seems to be on for Chrome builds but not Chromium builds by default. I was able to reproduce the issue on the Chromium build with the flag, so will run a bisect. Since this is related to the isolate origins flag and likely to the CL above, cc-ing weili@.
Labels: ReleaseBlock-Stable
Bisect result: https://chromium.googlesource.com/chromium/src/+log/d9aedf21200660473c243bf6d5623bc187496db4..1e5b5704d062321a0c6d000224573661029b4b19

which includes the CL mentioned in comment 3. Adding RBS since I think some enterprises use the --disable-print-preview flag, which means they will hit this for any PDF print. Feel free to remove if this doesn't reproduce on other machines, or if the isolate-origins flag is normally off by default.

Comment 5 by weili@chromium.org, Mar 10 2018

Cc: -weili@chromium.org
Owner: weili@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 12 2018

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

commit 68aabd926591afe79a3aa464ebb3eba038295b73
Author: Wei Li <weili@chromium.org>
Date: Mon Mar 12 22:36:47 2018

Identify PDF file being printed by checking URL

There are two cases that PDF files are being printed: from print
preview or directly from PDF plugin extension. Our previous way of
identifying a PDF file being printed replies on the printed
document's setting 'is_modifiable' is correctly set up. However,
it was only set up when print preview is enabled, not when using
system dialog. This CL fixed that by directly checking the web URL.

Also since the web url can be checked for print preview, we no
longer need to keep the flag 'for_preview' inside print composite
client. So removed that.

BUG= 820143 

Change-Id: I8c9051d5e2945b1d5a4b9f74494fbe3f6ad795f2
Reviewed-on: https://chromium-review.googlesource.com/958298
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542630}
[modify] https://crrev.com/68aabd926591afe79a3aa464ebb3eba038295b73/chrome/browser/printing/print_preview_dialog_controller.cc
[modify] https://crrev.com/68aabd926591afe79a3aa464ebb3eba038295b73/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/68aabd926591afe79a3aa464ebb3eba038295b73/chrome/browser/printing/print_view_manager_common.cc
[modify] https://crrev.com/68aabd926591afe79a3aa464ebb3eba038295b73/chrome/browser/printing/print_view_manager_common.h
[modify] https://crrev.com/68aabd926591afe79a3aa464ebb3eba038295b73/chrome/browser/printing/printing_init.cc
[modify] https://crrev.com/68aabd926591afe79a3aa464ebb3eba038295b73/components/printing/browser/print_composite_client.cc
[modify] https://crrev.com/68aabd926591afe79a3aa464ebb3eba038295b73/components/printing/browser/print_composite_client.h
[modify] https://crrev.com/68aabd926591afe79a3aa464ebb3eba038295b73/components/printing/browser/print_manager_utils.cc
[modify] https://crrev.com/68aabd926591afe79a3aa464ebb3eba038295b73/components/printing/browser/print_manager_utils.h

Comment 7 by weili@chromium.org, Mar 13 2018

Labels: Merge-Request-66
Verified on Canary 67.0.3369.0. This affects those with site isolation enabled (including isolate-origin, site-per-process) AND print preview disabled. The change itself is small and local to printing only. Thus request on a merge to M66
Labels: TE-Verified-M67 TE-Verified-67.0.3370.0
Able to reproduce the issue on chrome reported version 67.0.3365.0
Verified the fix on Windows-10 on Chrome version #67.0.3370.0 as per the comment#0 & 7
Attaching screen cast for reference.
Observed "Can open saved xps file after print completes"
Hence, the fix is working as expected.
Adding the verified label.

Thanks!
820143.mp4
3.1 MB View Download

Comment 9 by weili@chromium.org, Mar 14 2018

Status: Fixed (was: Started)
Labels: -Merge-Request-66 Merge-Approved-66
Approving for M66. Branch:3359
Project Member

Comment 11 by bugdroid1@chromium.org, Mar 14 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2701525235da737cb7d092730973fe8689c259e2

commit 2701525235da737cb7d092730973fe8689c259e2
Author: Wei Li <weili@chromium.org>
Date: Wed Mar 14 19:39:19 2018

Identify PDF file being printed by checking URL

There are two cases that PDF files are being printed: from print
preview or directly from PDF plugin extension. Our previous way of
identifying a PDF file being printed replies on the printed
document's setting 'is_modifiable' is correctly set up. However,
it was only set up when print preview is enabled, not when using
system dialog. This CL fixed that by directly checking the web URL.

Also since the web url can be checked for print preview, we no
longer need to keep the flag 'for_preview' inside print composite
client. So removed that.

BUG= 820143 

(cherry picked from commit 68aabd926591afe79a3aa464ebb3eba038295b73)

Change-Id: I8c9051d5e2945b1d5a4b9f74494fbe3f6ad795f2
Reviewed-on: https://chromium-review.googlesource.com/958298
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#542630}
Reviewed-on: https://chromium-review.googlesource.com/963304
Reviewed-by: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#239}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/2701525235da737cb7d092730973fe8689c259e2/chrome/browser/printing/print_preview_dialog_controller.cc
[modify] https://crrev.com/2701525235da737cb7d092730973fe8689c259e2/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/2701525235da737cb7d092730973fe8689c259e2/chrome/browser/printing/print_view_manager_common.cc
[modify] https://crrev.com/2701525235da737cb7d092730973fe8689c259e2/chrome/browser/printing/print_view_manager_common.h
[modify] https://crrev.com/2701525235da737cb7d092730973fe8689c259e2/chrome/browser/printing/printing_init.cc
[modify] https://crrev.com/2701525235da737cb7d092730973fe8689c259e2/components/printing/browser/print_composite_client.cc
[modify] https://crrev.com/2701525235da737cb7d092730973fe8689c259e2/components/printing/browser/print_composite_client.h
[modify] https://crrev.com/2701525235da737cb7d092730973fe8689c259e2/components/printing/browser/print_manager_utils.cc
[modify] https://crrev.com/2701525235da737cb7d092730973fe8689c259e2/components/printing/browser/print_manager_utils.h

Labels: TE-Verified-M66 TE-Verified-66.0.3359.33
Able to reproduce the issue on chrome reported version 67.0.3365.0
Verified the fix on Windows-10 on Chrome version #66.0.3359.33 as per the comment#0 & 7
Attaching screen cast for reference.
Observed "Can open saved xps file after print completes"
Hence, the fix is working as expected.
Adding the verified label.

Thanks!
820143.mp4
4.8 MB View Download

Sign in to add a comment