Issue metadata
Sign in to add a comment
|
PDF Print Preview & printed result wasn't show properly
Reported by
alessio....@z1srl.it,
Mar 13 2018
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36 Steps to reproduce the problem: 1. Have a printer with PostScript driver 2. Print a PDF on that printer What is the expected behavior? It's should print same result as shown on the browser What went wrong? Print Preview is ok. Top and Left margin on printed result are truncated. Did this work before? Yes 64 Chrome version: 65.0.3325.146 Channel: stable OS Version: 10.0 Flash Version: On Chrome 64 it worked perfectly. On Chrome 65 with a printer with PCL driver it works perfectly
,
Mar 13 2018
Will look into this. In the meantime, can you work around this issue by going to chrome://flags and setting the "Disable PostScript Printing" flag to "Enabled"?
,
Mar 13 2018
Few more questions, since I am having trouble reproducing this locally on Chrome 65 on Win10 with an HP PostScript printer: 1) Does this work correctly if you print from the system dialog instead of Print Preview? (ctrl + shift + P) 2) What printer are you using? 3) Can you attach a sample PDF that demonstrates the issue? 4) Are you using the fit to page checkbox?
,
Mar 14 2018
Hi, i have asked my customer those informations you need. As soon as I have them available, I write here. Unfortunately I don't have the opportunity to do these tests directly.
,
Mar 14 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 14 2018
Found a different PDF that I can reproduce the issue with. I can confirm that at least on my end there are 2 different workarounds for this issue: (1) Use the system dialog (printout looks the same in 64 and 65 when using the system dialog). This can be done either with ctrl + shift + p or by running with the --disable-print-preview flag. (2) Disable PostScript printing in chrome://flags as mentioned in comment 2. Please update when you know if these workarounds help in your case also.
,
Mar 14 2018
Hi here the answers: 1) Does this work correctly if you print from the system dialog instead of Print Preview? (ctrl + shift + P) Yes it works correctly 2) What printer are you using? CANON (see attachment canon.png) 3) Can you attach a sample PDF that demonstrates the issue? Yes, i attach 2 file pDF. TEST_OK.pdf, is a PDF that is created corretcly printing from Chrome 64 (the PS printer, after send document on print, save a PDF version of the document) TEST_KO.pdf, is the same document, but created using Chrome 65... the PDF version is "left-shifted" 4) Are you using the fit to page checkbox? Yes and no... i have tried in both ways
,
Mar 14 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/869d69c04ca623ce981ee94b6cdfc09492268885 commit 869d69c04ca623ce981ee94b6cdfc09492268885 Author: rbpotter <rbpotter@chromium.org> Date: Wed Mar 14 21:07:45 2018 Printing: fix margins when printing to PostScript printers Since we now send a PDF from print preview, the offsets aren't computed in PrintRenderFrameHelper. They should be the printable area offsets, not the content area. The content area offsets reflect the margins set in Print Preview, which are no longer relevant since the generated PDF already includes these margins. Bug: 821485 Change-Id: I5ba009408bb7bb0251cdd85b3ed7b6e10e293826 Reviewed-on: https://chromium-review.googlesource.com/962878 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#543192} [modify] https://crrev.com/869d69c04ca623ce981ee94b6cdfc09492268885/chrome/browser/printing/print_view_manager_base.cc
,
Mar 15 2018
Currently, my costumer has chosen to enable the --disable-print-preview flag on Chrome 65
,
Mar 15 2018
Tested this issue on the reported version 65.0.3325.146 on Windows 10 and printer 'HP LaserJet 4345 MFP PCL6 Class Driver' and unable to reproduce this issue. On printing the TEST_OK.PDF, cannot see any content getting truncated. We do not have the printer configuration with PostScript driver to verify this issue. rbpotter@ Request you to please check this issue on the latest Chrome builds and help us in verifying the fix. Thanks...
,
Mar 15 2018
Comment 10: The content does not get truncated in this case, the margins do. FYI, the issue is most obvious with PDF documents with content very near the top left corner of the page and with webpages printed with very large custom margins. Tested the user's example PDF as well as a different PDF on Windows 10 with Canary 67.0.3371.0. Printed to an HP LaserJet Pro with the HP Universal PS driver as well as to a Xerox Universal Printing PS driver set up to print to file. Tested fit to page and not fit to page. Also tested the chrome://version webpage with both default and custom margins. In all cases the margins appear correct. Requesting a merge to M-66 since this is a small change that only impacts the Windows PostScript printing code. The bug will only impact users on Windows with PostScript printers but will be a high impact for those users. There are workarounds but neither is ideal as some users may need to use features in Print Preview and spool sizes are much larger with PostScript printing disabled.
,
Mar 15 2018
After discussion, requesting a merge to 65 also, since we may be respinning anyway. This bug wouldn't warrant a re-spin on its own since there are workarounds, but the fix is very safe and the impact is high for affected users as explained in comment 11. I expect the number of affected users to increase as we ramp up, so it should be considered if we are re-spinning anyway. For anyone experiencing this issue, it should be fixed on Canary 67.0.3371.0 and higher.
,
Mar 15 2018
This bug requires manual review: M66 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 15 2018
How is the change looking in canary and how safe it is to merge to M65? Will it cause any other regressions?
,
Mar 15 2018
See comment 11 for information on Canary testing. Will take a look at crashes shortly and post information here. More detail on why this should be safe: The CL line changes are in a function that is only called when printing from Print Preview (StartLocalPrintJob). The change is to one argument of PrintDocument and this argument is only used in the call to start PostScript conversion here: https://cs.chromium.org/chromium/src/chrome/browser/printing/print_view_manager_base.cc?l=182 This call is in a section of code that is #ifdef for Windows OS only, so there is no impact on other platforms. So the only thing this could possibly regress is PostScript printing on Windows from Print Preview, which is where the current bug is. This means the worst case scenario is that users will have to use the workarounds listed in comment 6, which is the current state. As mentioned in comment 11, I have also tested a number of cases in Canary to try to verify this does not regress anything. Hopefully, thestig@ can verify on Canary also, so that we have a second confirmation.
,
Mar 15 2018
Thank you rbpotter@. Pls update the bug after you check canary crashes.
,
Mar 15 2018
Looked at crash reports on current Canary (67.0.3371.0) and do not see anything that looks related to this fix.
,
Mar 15 2018
Approving merge to branch 3325 based on comment #15 and #17.
,
Mar 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/be424e1be1d88ada72592a2cd2ff33a776a07a9d commit be424e1be1d88ada72592a2cd2ff33a776a07a9d Author: rbpotter <rbpotter@chromium.org> Date: Thu Mar 15 22:45:01 2018 Printing: fix margins when printing to PostScript printers (M65) Since we now send a PDF from print preview, the offsets aren't computed in PrintRenderFrameHelper. They should be the printable area offsets, not the content area. The content area offsets reflect the margins set in Print Preview, which are no longer relevant since the generated PDF already includes these margins. Bug: 821485 Change-Id: I5ba009408bb7bb0251cdd85b3ed7b6e10e293826 Reviewed-on: https://chromium-review.googlesource.com/962878 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#543192}(cherry picked from commit 869d69c04ca623ce981ee94b6cdfc09492268885) TBR: thestig@chromium.org Reviewed-on: https://chromium-review.googlesource.com/965181 Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/branch-heads/3325@{#709} Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} [modify] https://crrev.com/be424e1be1d88ada72592a2cd2ff33a776a07a9d/chrome/browser/printing/print_view_manager_base.cc
,
Mar 15 2018
Pls verify this fix on M65 version 65.0.3325.169 tomorrow. Thank you.
,
Mar 16 2018
The NextAction date has arrived: 2018-03-16
,
Mar 16 2018
Verified the fix on 65.0.3325.169 on Windows 10. Printed TEST_OK.pdf from comment 7 with fit to page enabled and disabled. Printed to HP LaserJet Pro with HP Universal PS driver and to Xerox Global Print Driver PS virtual printer. Also tested chrome://version HTML page with default margins, custom margins, and custom margins + non default scaling. In all cases printed margins appear correct.
,
Mar 16 2018
Thank you rbpotter@ for quick fix and merge. Requesting postmortem for this. Please see go/chrome-postmortems for the process to follow.
,
Mar 16 2018
,
Mar 16 2018
Moving this back to not fixed, because we are still waiting on approval for M66 merge. Adding RBS for M66 as well, since it would make no sense to fix this on 65 only to have it regress again in 66.
,
Mar 19 2018
Bugs can be fixed (on trunk) but still need merges. I don't really care either way, but maybe release managers have a stronger opinion.
,
Mar 19 2018
Approving merge to m66. branch:3359
,
Mar 19 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2555844ce7aaeade6cf1f64fdf62ac2d1904da3f commit 2555844ce7aaeade6cf1f64fdf62ac2d1904da3f Author: rbpotter <rbpotter@chromium.org> Date: Mon Mar 19 20:31:57 2018 Printing: fix margins when printing to PostScript printers (M66) Since we now send a PDF from print preview, the offsets aren't computed in PrintRenderFrameHelper. They should be the printable area offsets, not the content area. The content area offsets reflect the margins set in Print Preview, which are no longer relevant since the generated PDF already includes these margins. Bug: 821485 Change-Id: I5ba009408bb7bb0251cdd85b3ed7b6e10e293826 Reviewed-on: https://chromium-review.googlesource.com/962878 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#543192}(cherry picked from commit 869d69c04ca623ce981ee94b6cdfc09492268885) TBR: thestig@chromium.org Reviewed-on: https://chromium-review.googlesource.com/969225 Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/branch-heads/3359@{#326} Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276} [modify] https://crrev.com/2555844ce7aaeade6cf1f64fdf62ac2d1904da3f/chrome/browser/printing/print_view_manager_base.cc
,
Mar 20 2018
I'm having the same issue with my customers on Chrome Version 65.0.3325.162 The attached PDF illustrates the problem. The rectangle should appear centered on the page when printed to a postscript printer. It does not. I noticed a possible fix in comment #20 in version 65.0.3325.169 How do I get this build for my customers in field? Assuming this is the same bug, I need this fix ASAP. Thanks, Mike M
,
Mar 20 2018
Hi Mike. We'll have a version with the fix for this bug released soon. Hang in there.
,
Mar 20 2018
Tested this issue on the reported version #65.0.3325.146 on Windows 10 and printer 'HP LaserJet 4345 MFP PCL6 Class Driver' and unable to reproduce the issue as per comment #29. Observed that on printing the Chrome-PDF-Print-Bug.pdf using reported version #65.0.3325.146, the rectangle appeared to be printed centered on the page as expected. rbpotter@ - As we do not have the printer configuration with PostScript driver to verify this issue. Request you to please check this issue using chrome version #65.0.3325.181 and help us in verifying the fix. Thanks...!!
,
Mar 20 2018
Note: looks this CL merge in M-65 was already verified in 65.0.3325.169 by rbpotter@ in C#22.
,
Mar 20 2018
thestig, By soon do you mean within a day? I've got retail customers that print weekly Ad signs for price changes who cannot wait another day. If their signs don't match the registers they get fined $$. Is there any way to get an installer for version 65.0.3325.169 so I can test out the fix today?
,
Mar 20 2018
govind/pbommana: Is the next M65 update going out today? Do you mind if I share the to-be-released installer with Mike?
,
Mar 20 2018
And we are pushing out 65.0.3325.181 now. I believe if one visits chrome://settings/help manually, it should trigger an update check.
,
Mar 20 2018
Just downloaded and verified the fix in 65.0.3325.181 works! Can that simple rectangle PDF be put into any automated test somehow? So it doesn't regress again?
,
Mar 21 2018
The update worked for me as well. I'd also like to add that this issue was also present when using the Adobe PDF printer that comes with Adobe Acrobat DC, as well as with PostScript printer drivers. Not sure if a more reliable test can be done using the Adobe PDF printer since it seems to have a similar behavior.
,
Mar 23 2018
,
Mar 23 2018
Automated testing is bug 825121.
,
Apr 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fdff067a434c489a78221b2ffc71603caee9ffcc commit fdff067a434c489a78221b2ffc71603caee9ffcc Author: rbpotter <rbpotter@chromium.org> Date: Thu Apr 12 20:46:58 2018 Printing: Add test for PostScript offsets Bug: 821485 , 822505 Change-Id: I33f117cd64726a475ef2df220f9a8089fd5e9312 Reviewed-on: https://chromium-review.googlesource.com/1000408 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#550348} [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_job.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_job.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_job_manager.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_job_manager.h [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_test_utils.cc [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_test_utils.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_view_manager.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_view_manager_base.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_view_manager_unittest.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/printer_query.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/printer_query.h [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/test_print_job.cc [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/test_print_job.h [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/test_printer_query.cc [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/test_printer_query.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/test/BUILD.gn [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/printing/print_settings_conversion.h
,
Apr 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fdff067a434c489a78221b2ffc71603caee9ffcc commit fdff067a434c489a78221b2ffc71603caee9ffcc Author: rbpotter <rbpotter@chromium.org> Date: Thu Apr 12 20:46:58 2018 Printing: Add test for PostScript offsets Bug: 821485 , 822505 Change-Id: I33f117cd64726a475ef2df220f9a8089fd5e9312 Reviewed-on: https://chromium-review.googlesource.com/1000408 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#550348} [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_job.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_job.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_job_manager.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_job_manager.h [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_test_utils.cc [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_test_utils.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_view_manager.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_view_manager_base.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/print_view_manager_unittest.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/printer_query.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/printer_query.h [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/test_print_job.cc [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/test_print_job.h [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/test_printer_query.cc [add] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/printing/test_printer_query.h [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/chrome/test/BUILD.gn [modify] https://crrev.com/fdff067a434c489a78221b2ffc71603caee9ffcc/printing/print_settings_conversion.h |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by gov...@chromium.org
, Mar 13 2018Components: -UI Internals>Printing
Labels: Needs-Triage-M65