1 // Copyright 2014 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef PUBLIC_FPDF_PPO_H_ 8 #define PUBLIC_FPDF_PPO_H_ 9 10 // NOLINTNEXTLINE(build/include) 11 #include "fpdfview.h" 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 // Import pages to a FPDF_DOCUMENT. 18 // 19 // dest_doc - The destination document for the pages. 20 // src_doc - The document to be imported. 21 // pagerange - A page range string, Such as "1,3,5-7". If |pagerange| is NULL, 22 // all pages from |src_doc| are imported. 23 // index - The page index to insert at. 24 // 25 // Returns TRUE on success. 26 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_ImportPages(FPDF_DOCUMENT dest_doc, 27 FPDF_DOCUMENT src_doc, 28 FPDF_BYTESTRING pagerange, 29 int index); 30 31 // Experimental API. 32 // Create a new document from |src_doc|. The pages of |src_doc| will be 33 // combined to provide |num_pages_on_x_axis x num_pages_on_y_axis| pages per 34 // |output_doc| page. 35 // 36 // src_doc - The document to be imported. 37 // output_width - The output page width in PDF "user space" units. 38 // output_height - The output page height in PDF "user space" units. 39 // num_pages_on_x_axis - The number of pages on X Axis. 40 // num_pages_on_y_axis - The number of pages on Y Axis. 41 // 42 // Return value: 43 // A handle to the created document, or NULL on failure. 44 // 45 // Comments: 46 // number of pages per page = num_pages_on_x_axis * num_pages_on_y_axis 47 // 48 FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV 49 FPDF_ImportNPagesToOne(FPDF_DOCUMENT src_doc, 50 float output_width, 51 float output_height, 52 size_t num_pages_on_x_axis, 53 size_t num_pages_on_y_axis); 54 55 // Copy the viewer preferences from |src_doc| into |dest_doc|. 56 // 57 // dest_doc - Document to write the viewer preferences into. 58 // src_doc - Document to read the viewer preferences from. 59 // 60 // Returns TRUE on success. 61 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV 62 FPDF_CopyViewerPreferences(FPDF_DOCUMENT dest_doc, FPDF_DOCUMENT src_doc); 63 64 #ifdef __cplusplus 65 } // extern "C" 66 #endif // __cplusplus 67 68 #endif // PUBLIC_FPDF_PPO_H_ 69