Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Issue 2714073002: Eliminate PS printing edge cases (Closed)

Created:
3 years, 9 months ago by rbpotter
Modified:
3 years, 9 months ago
Reviewers:
Lei Zhang
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Eliminate PS printing edge cases There were a couple possible edge cases with the new postscript language level identification that could lead to incorrect behavior. (1) Printer is stuck in GDI centric mode. In this case the change to POSTSCRIPT_PASSTHROUGH will cause a failure. Check for POSTSCRIPT_ PASSTHROUGH support before running it. (2) Printer gets set to PS mode but the postscript level detection returns something weird. This would result in driver trying to send Gdi commands to a printer in PS mode. These issues are resolved in this patch. Finally, this fixes the problem of postscript printers not printing if the postscript feature is disabled by using GDI mode instead of PS mode to query the postscript level. BUG=614988 Review-Url: https://codereview.chromium.org/2714073002 Cr-Commit-Position: refs/heads/master@{#453312} Committed: https://chromium.googlesource.com/chromium/src/+/d8fd468f11a46afd3544885930b71744aa09acd6

Patch Set 1 #

Patch Set 2 : Remove unused function #

Patch Set 3 : Add check for PS enabled in initializer #

Patch Set 4 : Fix compile errors #

Total comments: 11

Patch Set 5 : Use GDI mode for PS level query #

Total comments: 10

Patch Set 6 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -35 lines) Patch
M chrome/browser/printing/pdf_to_emf_converter.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M printing/print_settings_initializer_win.cc View 1 2 3 4 5 3 chunks +45 lines, -33 lines 0 comments Download

Messages

Total messages: 40 (28 generated)
rbpotter
3 years, 9 months ago (2017-02-24 02:48:29 UTC) #5
rbpotter
FYI, need to add a check before calling IsPrinterPostScript to ensure that the postscript flag ...
3 years, 9 months ago (2017-02-24 21:40:23 UTC) #8
rbpotter
Added a check for postscript enabled so that PS printers don't get set to PS ...
3 years, 9 months ago (2017-02-24 22:29:29 UTC) #10
Lei Zhang
Still reading through print_settings_initializer_win.cc... https://codereview.chromium.org/2714073002/diff/60001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/2714073002/diff/60001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode372 chrome/browser/printing/pdf_to_emf_converter.cc:372: bool postscript_passthrough = int passthrough ...
3 years, 9 months ago (2017-02-25 03:03:36 UTC) #18
Lei Zhang
https://codereview.chromium.org/2714073002/diff/60001/printing/print_settings_initializer_win.cc File printing/print_settings_initializer_win.cc (right): https://codereview.chromium.org/2714073002/diff/60001/printing/print_settings_initializer_win.cc#newcode45 printing/print_settings_initializer_win.cc:45: int GetPrinterPostScriptLevel(HDC hdc) { Does this require PS centric ...
3 years, 9 months ago (2017-02-25 03:24:53 UTC) #19
rbpotter
Checked Win7 and 10, both PS levels, feature on and off. GDI seems to work.
3 years, 9 months ago (2017-02-25 04:50:40 UTC) #23
Lei Zhang
https://codereview.chromium.org/2714073002/diff/100001/printing/print_settings_initializer_win.cc File printing/print_settings_initializer_win.cc (right): https://codereview.chromium.org/2714073002/diff/100001/printing/print_settings_initializer_win.cc#newcode15 printing/print_settings_initializer_win.cc:15: bool HasEscapeSupprt(HDC hdc, DWORD escape) { Looks like we ...
3 years, 9 months ago (2017-02-25 09:09:35 UTC) #26
Lei Zhang
On 2017/02/25 04:50:40, rbpotter wrote: > Checked Win7 and 10, both PS levels, feature on ...
3 years, 9 months ago (2017-02-25 10:17:11 UTC) #27
rbpotter
Yes, I noticed that when I first started working on this on Windows 10. You ...
3 years, 9 months ago (2017-02-27 16:40:50 UTC) #28
Lei Zhang
lgtm
3 years, 9 months ago (2017-02-27 19:46:47 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2714073002/120001
3 years, 9 months ago (2017-02-27 19:55:15 UTC) #37
commit-bot: I haz the power
3 years, 9 months ago (2017-02-27 20:07:24 UTC) #40
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/d8fd468f11a46afd3544885930b7...

Powered by Google App Engine
This is Rietveld 408576698