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_FLATTEN_H_ 8 #define PUBLIC_FPDF_FLATTEN_H_ 9 10 // NOLINTNEXTLINE(build/include) 11 #include "fpdfview.h" 12 13 // Flatten operation failed. 14 #define FLATTEN_FAIL 0 15 // Flatten operation succeed. 16 #define FLATTEN_SUCCESS 1 17 // Nothing to be flattened. 18 #define FLATTEN_NOTHINGTODO 2 19 20 // Flatten for normal display. 21 #define FLAT_NORMALDISPLAY 0 22 // Flatten for print. 23 #define FLAT_PRINT 1 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif // __cplusplus 28 29 // Flatten annotations and form fields into the page contents. 30 // 31 // page - handle to the page. 32 // nFlag - One of the |FLAT_*| values denoting the page usage. 33 // 34 // Returns one of the |FLATTEN_*| values. 35 // 36 // Currently, all failures return |FLATTEN_FAIL| with no indication of the 37 // cause. 38 FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag); 39 40 #ifdef __cplusplus 41 } // extern "C" 42 #endif // __cplusplus 43 44 #endif // PUBLIC_FPDF_FLATTEN_H_ 45