From 66ce22c6cdb38ca5941c175aea371df92ae9cb8b Mon Sep 17 00:00:00 2001 From: xlou Date: Wed, 31 Jan 2018 22:24:05 +0000 Subject: Experimental API for N-up feature support for print FPDF_ImportNPagesToOne function is added to support N-up feature for print. If numPagesOnXAxis * numPagesOnYAxis == 0 Returns a nullptr. If numPagesOnXAxis * numPagesOnYAxis == 1 Creates a new PDF document, and import one page to each output page of the PDF document If numPagesOnXAxis * numPagesOnYAxis > 1, FPDF_ImportNPagesToOne imports multiple pages onto the same page. This feature is intended for print pipeline to use. Change-Id: Iec1afffe377ff9b7fef3cb33414b29b324154fa4 Reviewed-on: https://pdfium-review.googlesource.com/22050 Commit-Queue: Shirleen Lou Reviewed-by: Lei Zhang Reviewed-by: Henrique Nakashima Reviewed-by: dsinclair --- public/fpdf_ppo.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'public/fpdf_ppo.h') diff --git a/public/fpdf_ppo.h b/public/fpdf_ppo.h index 88c3162ecb..7b21aed404 100644 --- a/public/fpdf_ppo.h +++ b/public/fpdf_ppo.h @@ -28,6 +28,30 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_ImportPages(FPDF_DOCUMENT dest_doc, FPDF_BYTESTRING pagerange, int index); +// Experimental API. +// Create a new document from |src_doc|. The pages of |src_doc| will be +// combined to provide |num_pages_on_x_axis x num_pages_on_y_axis| pages per +// |output_doc| page. +// +// src_doc - The document to be imported. +// output_width - The output page width measured in pixels. +// output_height - The output page height measured in pixels. +// num_pages_on_x_axis - The number of pages on X Axis. +// num_pages_on_y_axis - The number of pages on Y Axis. +// +// Return value: +// A handle to the created document, or NULL on failure. +// +// Comments: +// number of pages per page = num_pages_on_x_axis * num_pages_on_y_axis +// +FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV +FPDF_ImportNPagesToOne(FPDF_DOCUMENT src_doc, + float output_width, + float output_height, + unsigned int num_pages_on_x_axis, + unsigned int num_pages_on_y_axis); + // Copy the viewer preferences from |src_doc| into |dest_doc|. // // dest_doc - Document to write the viewer preferences into. -- cgit v1.2.3