Add N-up support to chrome by rerendering PDFs. N-up is short for 2-up, 4-up, 8-up etc. where N pages of content are printing on a single sheet of paper.
Issue 775750 has been merged into this issue.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8b56f67bc9b537c118b7f57d09e7468a3ae1def1 commit 8b56f67bc9b537c118b7f57d09e7468a3ae1def1 Author: xlou <xlou@chromium.org> Date: Fri Feb 09 23:34:30 2018 Adding a feature flag for the N-up printing feature. This flag will be used for development / testing of the N-up printing feature. The plan is to have something available for testing in M67 behind the flag, and to use the flag to roll out changes when it is ready to launch. Bug: 775999 Change-Id: I2282ca057eb874c45068bde77259f82f5b10d5de Reviewed-on: https://chromium-review.googlesource.com/910310 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Sean Kau <skau@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#535880} [modify] https://crrev.com/8b56f67bc9b537c118b7f57d09e7468a3ae1def1/chrome/browser/about_flags.cc [modify] https://crrev.com/8b56f67bc9b537c118b7f57d09e7468a3ae1def1/chrome/browser/flag_descriptions.cc [modify] https://crrev.com/8b56f67bc9b537c118b7f57d09e7468a3ae1def1/chrome/browser/flag_descriptions.h [modify] https://crrev.com/8b56f67bc9b537c118b7f57d09e7468a3ae1def1/chrome/common/chrome_features.cc [modify] https://crrev.com/8b56f67bc9b537c118b7f57d09e7468a3ae1def1/chrome/common/chrome_features.h [modify] https://crrev.com/8b56f67bc9b537c118b7f57d09e7468a3ae1def1/tools/metrics/histograms/enums.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a428812ba46a9b1add897e3034a287e6a4b43aee commit a428812ba46a9b1add897e3034a287e6a4b43aee Author: xlou <xlou@chromium.org> Date: Sat Apr 14 00:03:33 2018 Add helper class printing::NupParameters. The helper class will be used to check whether a N-up value is a supported value or not, it will also be used to calculate N-up page layout which includes how many pages on x axis, how many pages on y axis, and the N-up page's orientation. Bug: 775999 Change-Id: I049a7bf87f3633939df076b809bba68941340bd8 Reviewed-on: https://chromium-review.googlesource.com/1013121 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Shirleen Lou <xlou@chromium.org> Cr-Commit-Position: refs/heads/master@{#550819} [modify] https://crrev.com/a428812ba46a9b1add897e3034a287e6a4b43aee/printing/BUILD.gn [add] https://crrev.com/a428812ba46a9b1add897e3034a287e6a4b43aee/printing/nup_parameters.cc [add] https://crrev.com/a428812ba46a9b1add897e3034a287e6a4b43aee/printing/nup_parameters.h [add] https://crrev.com/a428812ba46a9b1add897e3034a287e6a4b43aee/printing/nup_parameters_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/008759aa5bc8cd05c5296908efbf74dcb043d66e commit 008759aa5bc8cd05c5296908efbf74dcb043d66e Author: xlou <xlou@chromium.org> Date: Wed Apr 25 02:35:23 2018 Add N-up feature support to pdfium_engine. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. 1. Added ability to pass the N-up feature UI settings (which will be added in the next CL) to the print preview workflow, so that the PDF plugin can take action based on user's input. 2. Added N-up feature support to pdfium_engine, so that when the source is PDF, pdf plugin will generate the N-up output doc based on user's input. Bug: 775999 Change-Id: I27933d1a7da65376e70bdcb538393bb8bb3ec688 Reviewed-on: https://chromium-review.googlesource.com/1014628 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Sean Kau <skau@chromium.org> Cr-Commit-Position: refs/heads/master@{#553428} [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/components/printing/browser/print_manager_utils.cc [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/components/printing/common/print_messages.cc [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/components/printing/common/print_messages.h [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/components/printing/renderer/print_render_frame_helper.cc [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/content/renderer/pepper/pepper_plugin_instance_impl.cc [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/pdf/pdfium/DEPS [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/pdf/pdfium/pdfium_engine.cc [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/pdf/pdfium/pdfium_engine.h [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/ppapi/api/dev/pp_print_settings_dev.idl [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/ppapi/c/dev/pp_print_settings_dev.h [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/ppapi/proxy/ppapi_messages.h [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/printing/print_settings.cc [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/printing/print_settings.h [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/printing/print_settings_conversion.cc [modify] https://crrev.com/008759aa5bc8cd05c5296908efbf74dcb043d66e/third_party/blink/public/web/web_print_params.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8a67bbaef837cbefb92a0954b2f671f1541f0a06 commit 8a67bbaef837cbefb92a0954b2f671f1541f0a06 Author: Henrik Boström <hbos@chromium.org> Date: Wed Apr 25 10:55:16 2018 Revert "Add N-up feature support to pdfium_engine." This reverts commit 008759aa5bc8cd05c5296908efbf74dcb043d66e. Reason for revert: Breaks MSan Tests Findit (https://goo.gl/kROfz5) confirmed this CL at revision 553428 as the culprit for failures in the build cycles as shown on: https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzAwODc1OWFhNWJjOGNkMDVjNTI5NjkwOGVmYmY3NGRjYjA0M2Q2NmUM Example: https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.memory%2FLinux_ChromiumOS_MSan_Tests%2F6869%2F%2B%2Frecipes%2Fsteps%2Fmus_browser_tests%2F0%2Flogs%2FOutOfProcessPPAPITest.Printing%2F0 Uninitialized bytes in __msan_check_mem_is_initialized at offset 0 inside [0x7f914c1f9524, 4) ==9854==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x12c35d8e in WriteBytesCommon ./../../base/pickle.cc:430:3 #1 0x12c35d8e in void base::Pickle::WriteBytesStatic<4ul>(void const*) ./../../base/pickle.cc:395:0 #2 0xb00ffa1 in WritePOD<int> ./../../base/pickle.h:327:5 #3 0xb00ffa1 in WriteInt ./../../base/pickle.h:190:0 #4 0xb00ffa1 in Write ./../../ipc/ipc_message_utils.h:186:0 #5 0xb00ffa1 in WriteParam<unsigned int> ./../../ipc/ipc_message_utils.h:110:0 #6 0xb00ffa1 in IPC::ParamTraits<PP_PrintSettings_Dev>::Write(base::Pickle*, PP_PrintSettings_Dev const&) ./../../ppapi/proxy/ppapi_messages.h:223:0 #7 0xd1e82ee in MessageT<true, false> ./../../ipc/ipc_message_templates.h:124:33 ... Uninitialized value was stored to memory at #0 0xb010122 in IPC::ParamTraits<PP_PrintSettings_Dev>::Write(base::Pickle*, PP_PrintSettings_Dev const&) ./../../ppapi/proxy/ppapi_messages.h:0:1 #1 0xd1e82ee in MessageT<true, false> ./../../ipc/ipc_message_templates.h:124:33 #2 0xd1e82ee in content::PepperPrintingHost::PrintSettingsCallback(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>) ./../../content/browser/renderer_host/pepper/pepper_printing_host.cc:55:0 #3 0xd1e87e2 in Invoke<const base::WeakPtr<content::PepperPrintingHost> &, const ppapi::host::ReplyMessageContext &, std::__1::pair<PP_PrintSettings_Dev, int> > ./../../base/bind_internal.h:447:12 #4 0xd1e87e2 in MakeItSo<void (content::PepperPrintingHost::*const &)(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>), const base::WeakPtr<content::PepperPrintingHost> &, const ppapi::host::ReplyMessageContext &, std::__1::pair<PP_PrintSettings_Dev, int> > ./../../base/bind_internal.h:550:0 #5 0xd1e87e2 in RunImpl<void (content::PepperPrintingHost::*const &)(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>), const std::__1::tuple<base::WeakPtr<content::PepperPrintingHost>, ppapi::host::ReplyMessageContext> &, 0, 1> ./../../base/bind_internal.h:604:0 #6 0xd1e87e2 in base::internal::Invoker<base::internal::BindState<void (content::PepperPrintingHost::*)(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>), base::WeakPtr<content::PepperPrintingHost>, ppapi::host::ReplyMessageContext>, void (std::__1::pair<PP_PrintSettings_Dev, int>)>::Run(base::internal::BindStateBase*, std::__1::pair<PP_PrintSettings_Dev, int>&&) ./../../base/bind_internal.h:586:0 #7 0xd1e7292 in Run ./../../base/callback.h:96:12 ... Original change's description: > Add N-up feature support to pdfium_engine. > > In printing, 2-up, 3-up, or more generally N-up refers to a page > layout strategy in which multiple pages are composited onto a > single page. > > 1. Added ability to pass the N-up feature UI settings (which will be > added in the next CL) to the print preview workflow, so that the > PDF plugin can take action based on user's input. > 2. Added N-up feature support to pdfium_engine, so that when the > source is PDF, pdf plugin will generate the N-up output doc based > on user's input. > > Bug: 775999 > Change-Id: I27933d1a7da65376e70bdcb538393bb8bb3ec688 > Reviewed-on: https://chromium-review.googlesource.com/1014628 > Commit-Queue: Shirleen Lou <xlou@chromium.org> > Reviewed-by: Daniel Cheng <dcheng@chromium.org> > Reviewed-by: Jochen Eisinger <jochen@chromium.org> > Reviewed-by: Lei Zhang <thestig@chromium.org> > Reviewed-by: Sean Kau <skau@chromium.org> > Cr-Commit-Position: refs/heads/master@{#553428} TBR=raymes@chromium.org,palmer@chromium.org,dcheng@chromium.org,thestig@chromium.org,skau@chromium.org,jochen@chromium.org,xlou@chromium.org Change-Id: I017a6dd2527c843ebb365bf5ec2da19696860898 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 775999 Reviewed-on: https://chromium-review.googlesource.com/1027770 Reviewed-by: Henrik Boström <hbos@chromium.org> Commit-Queue: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#553507} [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/components/printing/browser/print_manager_utils.cc [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/components/printing/common/print_messages.cc [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/components/printing/common/print_messages.h [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/components/printing/renderer/print_render_frame_helper.cc [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/content/renderer/pepper/pepper_plugin_instance_impl.cc [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/pdf/pdfium/DEPS [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/pdf/pdfium/pdfium_engine.cc [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/pdf/pdfium/pdfium_engine.h [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/ppapi/api/dev/pp_print_settings_dev.idl [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/ppapi/c/dev/pp_print_settings_dev.h [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/ppapi/proxy/ppapi_messages.h [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/printing/print_settings.cc [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/printing/print_settings.h [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/printing/print_settings_conversion.cc [modify] https://crrev.com/8a67bbaef837cbefb92a0954b2f671f1541f0a06/third_party/blink/public/web/web_print_params.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/19420756538dd841c1a1ee260a001f28e87ea13b commit 19420756538dd841c1a1ee260a001f28e87ea13b Author: xlou <xlou@chromium.org> Date: Thu Apr 26 23:42:44 2018 Add N-up feature support to pdfium_engine. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. 1. Added ability to pass the N-up feature UI settings(which will be added in the next CL) to the print preview workflow, so that the PDF plugin can take action based on user's input. 2. Added N-up feature support to pdfium_engine, so that when the source is PDF, pdf plugin will generate the N-up output doc based on user's input. These changes have been reviewed in: https://chromium-review.googlesource.com/c/chromium/src/+/1014628. Bug: 775999 Change-Id: I552c9c91e32af0faa6ffaa8c42ac0652f470f791 Reviewed-on: https://chromium-review.googlesource.com/1028992 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Commit-Queue: Shirleen Lou <xlou@chromium.org> Cr-Commit-Position: refs/heads/master@{#554188} [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/components/printing/browser/print_manager_utils.cc [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/components/printing/common/print_messages.cc [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/components/printing/common/print_messages.h [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/components/printing/renderer/print_render_frame_helper.cc [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/content/browser/renderer_host/pepper/pepper_print_settings_manager.cc [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/content/renderer/pepper/pepper_plugin_instance_impl.cc [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/pdf/pdfium/DEPS [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/pdf/pdfium/pdfium_engine.cc [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/pdf/pdfium/pdfium_engine.h [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/ppapi/api/dev/pp_print_settings_dev.idl [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/ppapi/c/dev/pp_print_settings_dev.h [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/ppapi/proxy/ppapi_messages.h [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/printing/print_settings.cc [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/printing/print_settings.h [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/printing/print_settings_conversion.cc [modify] https://crrev.com/19420756538dd841c1a1ee260a001f28e87ea13b/third_party/blink/public/web/web_print_params.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4f2a1530f99e427f27b797b7ef27d527bed55ad1 commit 4f2a1530f99e427f27b797b7ef27d527bed55ad1 Author: xlou <xlou@chromium.org> Date: Fri Apr 27 15:30:24 2018 Add unittest for PP_PrintSettings_Dev's new field. A new field num_pages_per_sheet is added to PP_PrintSettings_Dev in https://chromium-review.googlesource.com/c/chromium/src/+/1028992. This CL modifies two existing tests to check the newly added field. Bug: 775999 Change-Id: I79f8cd9ef32e3319150fee7f90b3f7b2a7d7965d Reviewed-on: https://chromium-review.googlesource.com/1030774 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Raymes Khoury <raymes@chromium.org> Commit-Queue: Shirleen Lou <xlou@chromium.org> Cr-Commit-Position: refs/heads/master@{#554392} [modify] https://crrev.com/4f2a1530f99e427f27b797b7ef27d527bed55ad1/content/browser/renderer_host/pepper/pepper_printing_host_unittest.cc [modify] https://crrev.com/4f2a1530f99e427f27b797b7ef27d527bed55ad1/ppapi/proxy/printing_resource_unittest.cc
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
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6bd7c2d1379fa7728539fb7858feab6ac904b80c commit 6bd7c2d1379fa7728539fb7858feab6ac904b80c Author: xlou <xlou@chromium.org> Date: Tue Jul 10 01:35:40 2018 Change num_pages_per_sheet to pages_per_sheet. Since the UI displays Pages Per Sheet for the N-up setting, and there was a review comment previously to rename it to pages_per_sheet, so I am renaming the variable name here. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: I538c22a450a603f6b0896a2c5c4273052ba9e969 Reviewed-on: https://chromium-review.googlesource.com/1128325 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Sean Kau <skau@chromium.org> Reviewed-by: Chris Palmer <palmer@chromium.org> Reviewed-by: Raymes Khoury <raymes@chromium.org> Commit-Queue: Shirleen Lou <xlou@chromium.org> Cr-Commit-Position: refs/heads/master@{#573588} [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/chrome/browser/ui/webui/print_preview/print_preview_handler.cc [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/components/printing/browser/print_manager_utils.cc [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/components/printing/common/print_messages.cc [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/components/printing/common/print_messages.h [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/components/printing/renderer/print_render_frame_helper.cc [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/content/renderer/pepper/pepper_plugin_instance_impl.cc [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/pdf/pdfium/pdfium_print.cc [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/ppapi/c/private/ppp_pdf.h [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/ppapi/proxy/ppapi_messages.h [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/printing/print_settings.cc [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/printing/print_settings.h [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/printing/print_settings_conversion.cc [modify] https://crrev.com/6bd7c2d1379fa7728539fb7858feab6ac904b80c/third_party/blink/public/web/web_print_params.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8252cb8bcfe0ad40212b91520c43fbd11288f00a commit 8252cb8bcfe0ad40212b91520c43fbd11288f00a Author: xlou <xlou@chromium.org> Date: Fri Jul 13 00:32:58 2018 Change num_pages_per_sheet to pages_per_sheet. Missed some in CL: crrev.com/c/1128325. Since the UI displays Pages Per Sheet for the N-up setting, and there was a review comment previously to rename it to pages_per_sheet, so I am renaming the variable name here. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: Ie605699d64a3ad1fcf2f943378e08065048183e5 Reviewed-on: https://chromium-review.googlesource.com/1135895 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Shirleen Lou <xlou@chromium.org> Cr-Commit-Position: refs/heads/master@{#574791} [modify] https://crrev.com/8252cb8bcfe0ad40212b91520c43fbd11288f00a/pdf/pdfium/pdfium_print.h [modify] https://crrev.com/8252cb8bcfe0ad40212b91520c43fbd11288f00a/printing/nup_parameters.cc [modify] https://crrev.com/8252cb8bcfe0ad40212b91520c43fbd11288f00a/printing/nup_parameters.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/71c45c897540ce9153b1c3e63b308e658cbc61d5 commit 71c45c897540ce9153b1c3e63b308e658cbc61d5 Author: xlou <xlou@chromium.org> Date: Sat Jul 21 01:19:17 2018 Expose pdfium functionality for N-up mojo service. Added two new functions to expose pdfium functionality to the to-be-created N-up conversion mojo service. ConvertPdfPagesToNupPdf will take multiple PDF pages and import them into a N-up PDF. ConvertPdfDocumentToNupPdf will take an entire PDF document and convert it to a N-up PDF document. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: I11edc90ee717fcb295a35e3784f4ed4e72ae8117 Reviewed-on: https://chromium-review.googlesource.com/1134484 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#577052} [modify] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/pdf.cc [modify] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/pdf.h [modify] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/pdf_engine.h [modify] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/pdfium/pdfium_engine_exports.cc [modify] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/pdfium/pdfium_engine_exports.h [modify] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/pdfium/pdfium_engine_exports_unittest.cc [modify] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/pdfium/pdfium_print.cc [modify] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/pdfium/pdfium_print.h [add] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/test/data/rectangles.pdf [add] https://crrev.com/71c45c897540ce9153b1c3e63b308e658cbc61d5/pdf/test/data/rectangles_multi_pages.pdf
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/63b093741c532a2330f09dbc02bd3e64f1f8f044 commit 63b093741c532a2330f09dbc02bd3e64f1f8f044 Author: xlou <xlou@chromium.org> Date: Thu Jul 26 17:12:33 2018 Add pagesPerSheet to the resetPrintPreviewMode JS message. When N-up feature is enabled, we need to pass the pagesPerSheet value to the pdf plugin, so that it can compute the number of Nup pages and append appropriate number of blank pages. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: Id8efc03c997ed7e2c643ec53f80747c2efa4719b Reviewed-on: https://chromium-review.googlesource.com/1148989 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#578345} [modify] https://crrev.com/63b093741c532a2330f09dbc02bd3e64f1f8f044/chrome/browser/resources/print_preview/new/preview_area.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e4d2853f126b1ba2dcb4f693af611c0ccea3c4fe commit e4d2853f126b1ba2dcb4f693af611c0ccea3c4fe Author: xlou <xlou@chromium.org> Date: Tue Jul 31 22:03:34 2018 Print Preview: Set page index as pageIndex when pagesPerSheet > 1. When sending URLs to the PDF plugin, the page index in the URL needs to be the page index for the displayed PDF document. When N-up > 1, this will not match the page index from the selected pages in the UI, since the N-up page numbers will be recalculated using the number of pages selected and pagesPerSheet Value. The new number of pages will be ceil(#pages selected/pagesPerSheet), and the index of the N-up pages will start from 0. Hence changing the function onPagePreviewReady_ to use the N-upped document index when pagesPerSheet > 1. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: I1488431713815b573eb2798e23b011417b9fa46d Reviewed-on: https://chromium-review.googlesource.com/1155906 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#579588} [modify] https://crrev.com/e4d2853f126b1ba2dcb4f693af611c0ccea3c4fe/chrome/browser/resources/print_preview/new/preview_area.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8c7a329b221cd9b2ddb12c62500042340bb8ba26 commit 8c7a329b221cd9b2ddb12c62500042340bb8ba26 Author: xlou <xlou@chromium.org> Date: Wed Aug 22 16:55:50 2018 Added an interface to the printing Mojo service for N-up conversion. Added an interface to the existing printing Mojo service for pdf N-up Conversion for web content. The service has two main functions: NupPageConvert(): Convert N PDF pages to a N-up PDF. NupDocumentConvert(): Convert a PDF document to a N-up PDF document. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: I7c3b78a6d7b2fdaaa3d67e456b6b3b624480897e Reviewed-on: https://chromium-review.googlesource.com/1172100 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#585097} [modify] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/browser/BUILD.gn [add] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/browser/printing/pdf_nup_converter_client.cc [add] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/browser/printing/pdf_nup_converter_client.h [modify] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/services/printing/BUILD.gn [modify] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/services/printing/DEPS [modify] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/services/printing/manifest.json [add] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/services/printing/pdf_nup_converter.cc [add] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/services/printing/pdf_nup_converter.h [modify] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/services/printing/printing_service.cc [modify] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/services/printing/public/mojom/BUILD.gn [add] https://crrev.com/8c7a329b221cd9b2ddb12c62500042340bb8ba26/chrome/services/printing/public/mojom/pdf_nup_converter.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/11aa99e0d5028ef16815ebf65ec819985db6cee5 commit 11aa99e0d5028ef16815ebf65ec819985db6cee5 Author: xlou <xlou@chromium.org> Date: Mon Sep 03 01:03:35 2018 PrintPreview: Add N-up support to the printing pipeline. Added callback handling when pagesPerSheet > 1. Added more fields to print messages to support N-up printing. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: Ic24fef1b49f21dd35fcbc334736b62128e7edd98 Reviewed-on: https://chromium-review.googlesource.com/1182615 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#588306} [modify] https://crrev.com/11aa99e0d5028ef16815ebf65ec819985db6cee5/chrome/browser/printing/print_preview_message_handler.cc [modify] https://crrev.com/11aa99e0d5028ef16815ebf65ec819985db6cee5/chrome/browser/printing/print_preview_message_handler.h [modify] https://crrev.com/11aa99e0d5028ef16815ebf65ec819985db6cee5/chrome/browser/printing/printing_init.cc [modify] https://crrev.com/11aa99e0d5028ef16815ebf65ec819985db6cee5/chrome/browser/ui/webui/print_preview/print_preview_ui.cc [modify] https://crrev.com/11aa99e0d5028ef16815ebf65ec819985db6cee5/chrome/browser/ui/webui/print_preview/print_preview_ui.h [modify] https://crrev.com/11aa99e0d5028ef16815ebf65ec819985db6cee5/components/printing/common/print_messages.h [modify] https://crrev.com/11aa99e0d5028ef16815ebf65ec819985db6cee5/components/printing/renderer/print_render_frame_helper.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/23ed99cddc26f0a6aca9bfc9189108f96dd811a9 commit 23ed99cddc26f0a6aca9bfc9189108f96dd811a9 Author: xlou <xlou@chromium.org> Date: Mon Sep 03 01:22:38 2018 PrintPreview: Disable margins when pagesPerSheet > 1. For initial release, set margins to default value and disable the margins button when pagesPerSheet > 1. Put the pagesPerSheet settings section on top of the Margins settings section, in order to make it easier to understand that margins are disabled because of pages per sheet > 1. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: I76aa4336507b17e41d6d4a42d5cfc7d35c5ea85e Reviewed-on: https://chromium-review.googlesource.com/1186115 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#588310} [modify] https://crrev.com/23ed99cddc26f0a6aca9bfc9189108f96dd811a9/chrome/browser/resources/print_preview/new/app.html [modify] https://crrev.com/23ed99cddc26f0a6aca9bfc9189108f96dd811a9/chrome/browser/resources/print_preview/new/margins_settings.html [modify] https://crrev.com/23ed99cddc26f0a6aca9bfc9189108f96dd811a9/chrome/browser/resources/print_preview/new/margins_settings.js [modify] https://crrev.com/23ed99cddc26f0a6aca9bfc9189108f96dd811a9/chrome/browser/resources/print_preview/new/preview_area.js [modify] https://crrev.com/23ed99cddc26f0a6aca9bfc9189108f96dd811a9/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js [modify] https://crrev.com/23ed99cddc26f0a6aca9bfc9189108f96dd811a9/chrome/test/data/webui/print_preview/preview_generation_test.js [modify] https://crrev.com/23ed99cddc26f0a6aca9bfc9189108f96dd811a9/chrome/test/data/webui/print_preview/settings_section_test.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ad22caf14833319d12a250629f1ec5f401648477 commit ad22caf14833319d12a250629f1ec5f401648477 Author: xlou <xlou@chromium.org> Date: Thu Sep 13 22:09:34 2018 Print Preview: Fit into printable area after N-up conversion. Currently N-up conversion uses physical page size to fit N pages onto one sheet. So we need to fit the N-upped document into printable area before sending to the UI or a printer. In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: Ie5a80aa89979fecb08b9acc16c2aae47b7ce914e Reviewed-on: https://chromium-review.googlesource.com/1204854 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#591179} [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/browser/printing/pdf_nup_converter_client.cc [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/browser/printing/pdf_nup_converter_client.h [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/browser/printing/print_preview_message_handler.cc [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/browser/printing/print_preview_message_handler.h [add] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/browser/printing/print_preview_message_handler_unittest.cc [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/browser/ui/webui/print_preview/print_preview_ui.cc [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/browser/ui/webui/print_preview/print_preview_ui.h [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/services/printing/pdf_nup_converter.cc [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/services/printing/pdf_nup_converter.h [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/services/printing/public/mojom/pdf_nup_converter.mojom [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/chrome/test/BUILD.gn [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/pdf/pdf.cc [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/pdf/pdf.h [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/pdf/pdf_engine.h [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/pdf/pdfium/pdfium_engine_exports.cc [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/pdf/pdfium/pdfium_engine_exports.h [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/pdf/pdfium/pdfium_engine_exports_unittest.cc [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/pdf/pdfium/pdfium_print.cc [modify] https://crrev.com/ad22caf14833319d12a250629f1ec5f401648477/pdf/pdfium/pdfium_print.h
Issue 144222 has been merged into this issue.
To make finch configuration happy.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/497f5ffe53417411f0e7a7a79dcb87eb13a578a2 commit 497f5ffe53417411f0e7a7a79dcb87eb13a578a2 Author: xlou <xlou@chromium.org> Date: Tue Oct 09 16:38:40 2018 Field trial config for NupPrinting. A couple of finch experiment reports show that the featutre doesn't impact any metrics that is monitored. Hence move onto the next step of finch experiment. Bug: 775999 Change-Id: I5f7e9328f3878081a622250d1e2790ba5e1a9926 Reviewed-on: https://chromium-review.googlesource.com/c/1269184 Reviewed-by: Robert Kaplow (sloooow) <rkaplow@chromium.org> Commit-Queue: Shirleen Lou <xlou@chromium.org> Cr-Commit-Position: refs/heads/master@{#597947} [modify] https://crrev.com/497f5ffe53417411f0e7a7a79dcb87eb13a578a2/testing/variations/fieldtrial_testing_config.json
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/62f2f8f209a82db0dd5a311eb4f844bddb75c98e commit 62f2f8f209a82db0dd5a311eb4f844bddb75c98e Author: xlou <xlou@chromium.org> Date: Wed Oct 17 01:11:42 2018 Print Preview N-up printing: Enable by default on ToT In printing, 2-up, 3-up, or more generally N-up refers to a page layout strategy in which multiple pages are composited onto a single page. Bug: 775999 Change-Id: I60295e1e142c1f7ef500d4031684b361af5b9e90 Reviewed-on: https://chromium-review.googlesource.com/c/1274454 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Shirleen Lou <xlou@chromium.org> Cr-Commit-Position: refs/heads/master@{#600223} [modify] https://crrev.com/62f2f8f209a82db0dd5a311eb4f844bddb75c98e/chrome/common/chrome_features.cc
Comment 1 by skau@chromium.org
, Oct 18 2017