New issue
Advanced search Search tips

Issue 835654 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 2
Type: Bug



Sign in to add a comment

Print upscaling broken for PDFs

Reported by tobias...@gmail.com, Apr 22 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Open a PDF file with Chrome, e.g. http://www.liqun.org/mobile/sample.pdf
2. Open the print dialogue
3. Set the print scaling factor to 150%. Notice that in the preview, this correctly leads to scaling up.
4. Print the page to a printer (real or virtual).

What is the expected behavior?
The printed page should be scaled up.

What went wrong?
It's not scaled up, and space has been added on all sides (see screenshot).

Did this work before? N/A 

Chrome version: 65.0.3325.181  Channel: n/a
OS Version: 10.0
Flash Version: 

Scaling down seems to work.
 
Chrome print scaling comparison.png
667 KB View Download
Labels: Needs-Triage-M65
Components: Internals>Printing
Labels: OS-Linux
Owner: rbpotter@chromium.org
Status: Assigned (was: Unconfirmed)
Will take a look. Seems to be an issue on Linux also, although it manifests by the printer refusing to print the document instead of printing with large margins.
Project Member

Comment 4 by bugdroid1@chromium.org, May 22 2018

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

commit dc88867d7ec922480abb2db80dd694c0f87052d8
Author: Lei Zhang <thestig@chromium.org>
Date: Tue May 22 16:57:47 2018

Add a PrintBegin method to PPP_Pdf_1_1.

PPP_Printing_Dev_0_6 uses struct PP_PrintSettings_Dev in its Begin
method. r554188 changed the struct to add a new field, and another
pending CL wants to add one more field. These changes may not be safe
because Flash also uses PPP_Printing_Dev_0_6.

To resolve this issue, revert the PP_PrintSettings_Dev changes. In its
place, add a separate struct PP_PdfPrintSettings_Dev, and a separate
PrintBegin method to PPP_Pdf_1_1. When printing, if PPP_Pdf is
available, use its PrintBegin method. Otherwise, use PPP_Printing_Dev's
Begin method.

BUG= 775999 , 835654 

Change-Id: Ia489668c301e28eb943270fd1d7e268ede6300c5
Reviewed-on: https://chromium-review.googlesource.com/1065015
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560658}
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/content/browser/renderer_host/pepper/pepper_print_settings_manager.cc
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/content/browser/renderer_host/pepper/pepper_printing_host_unittest.cc
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/content/renderer/pepper/pepper_plugin_instance_impl.cc
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/pdf/out_of_process_instance.cc
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/pdf/out_of_process_instance.h
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/pdf/pdf_engine.h
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/pdf/pdfium/pdfium_engine.cc
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/pdf/pdfium/pdfium_engine.h
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/pdf/pdfium/pdfium_print.cc
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/pdf/pdfium/pdfium_print.h
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/ppapi/api/dev/pp_print_settings_dev.idl
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/ppapi/c/dev/pp_print_settings_dev.h
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/ppapi/c/private/ppp_pdf.h
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/ppapi/proxy/ppapi_messages.h
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/ppapi/proxy/ppp_pdf_proxy.cc
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/ppapi/proxy/ppp_pdf_proxy.h
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/ppapi/proxy/ppp_printing_proxy.cc
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/ppapi/proxy/ppp_printing_proxy.h
[modify] https://crrev.com/dc88867d7ec922480abb2db80dd694c0f87052d8/ppapi/proxy/printing_resource_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, May 23 2018

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

commit da7dc652f35badf004c0c7e5b7966152fddbf4d3
Author: rbpotter <rbpotter@chromium.org>
Date: Wed May 23 01:41:23 2018

Printing: Fix upscale PDF breakage

PDF scaling was implemented by scaling the page size, which no longer
works when sending the PDF from print preview. Instead, perform the
scaling in Pdfium engine, like we do for fit to page.

Bug:  835654 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I0f2c6cef995b85090a6ea0b540b5c940d7513495
Reviewed-on: https://chromium-review.googlesource.com/1036083
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560879}
[modify] https://crrev.com/da7dc652f35badf004c0c7e5b7966152fddbf4d3/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/da7dc652f35badf004c0c7e5b7966152fddbf4d3/components/printing/renderer/print_render_frame_helper.h
[modify] https://crrev.com/da7dc652f35badf004c0c7e5b7966152fddbf4d3/components/printing/renderer/print_render_frame_helper_linux.cc
[modify] https://crrev.com/da7dc652f35badf004c0c7e5b7966152fddbf4d3/components/printing/renderer/print_render_frame_helper_mac.mm
[modify] https://crrev.com/da7dc652f35badf004c0c7e5b7966152fddbf4d3/content/renderer/pepper/pepper_plugin_instance_impl.cc
[modify] https://crrev.com/da7dc652f35badf004c0c7e5b7966152fddbf4d3/pdf/pdfium/pdfium_print.cc
[modify] https://crrev.com/da7dc652f35badf004c0c7e5b7966152fddbf4d3/third_party/blink/public/web/web_print_params.h

Labels: Needs-Feedback
This works for me on Canary 68.0.3440.0 on Windows 10. Is anyone still seeing issues with this in the latest version of Canary?
Status: Fixed (was: Assigned)
Works for me on Canary.

Sign in to add a comment