| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef PUBLIC_FPDF_FLATTEN_H_ | 7 #ifndef PUBLIC_FPDF_FLATTEN_H_ |
| 8 #define PUBLIC_FPDF_FLATTEN_H_ | 8 #define PUBLIC_FPDF_FLATTEN_H_ |
| 9 | 9 |
| 10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
| 11 | 11 |
| 12 // Result codes. | 12 // Flatten operation failed. |
| 13 #define FLATTEN_FAIL 0 // Flatten operation failed. | 13 #define FLATTEN_FAIL 0 |
| 14 #define FLATTEN_SUCCESS 1 // Flatten operation succeed. | 14 // Flatten operation succeed. |
| 15 #define FLATTEN_NOTHINGTODO 2 // There is nothing to be flattened. | 15 #define FLATTEN_SUCCESS 1 |
| 16 // Nothing to be flattened. |
| 17 #define FLATTEN_NOTHINGTODO 2 |
| 16 | 18 |
| 17 // Flags. | 19 // Flatten for normal display. |
| 18 #define FLAT_NORMALDISPLAY 0 | 20 #define FLAT_NORMALDISPLAY 0 |
| 21 // Flatten for print. |
| 19 #define FLAT_PRINT 1 | 22 #define FLAT_PRINT 1 |
| 20 | 23 |
| 21 #ifdef __cplusplus | 24 #ifdef __cplusplus |
| 22 extern "C" { | 25 extern "C" { |
| 23 #endif | 26 #endif // __cplusplus |
| 24 | 27 |
| 25 // Function: FPDFPage_Flatten | 28 // Flatten annotations and form fields into the page contents. |
| 26 // Make annotations and form fields become part of the page contents | 29 // |
| 27 // itself. | 30 // page - handle to the page. |
| 28 // Parameters: | 31 // nFlag - One of the |FLAT_*| values denoting the page usage. |
| 29 // page - Handle to the page, as returned by FPDF_LoadPage(). | 32 // |
| 30 // nFlag - Intended use of the flattened result: 0 for normal display, | 33 // Returns one of the |FLATTEN_*| values. |
| 31 // 1 for printing. | 34 // |
| 32 // Return value: | 35 // Currently, all failures return |FLATTEN_FAIL| with no indication of the |
| 33 // Either FLATTEN_FAIL, FLATTEN_SUCCESS, or FLATTEN_NOTHINGTODO (see | 36 // cause. |
| 34 // above). | |
| 35 // Comments: | |
| 36 // Currently, all failures return FLATTEN_FAIL, with no indication for | |
| 37 // the reason | |
| 38 // for the failure. | |
| 39 DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag); | 37 DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag); |
| 40 | 38 |
| 41 #ifdef __cplusplus | 39 #ifdef __cplusplus |
| 42 } | 40 } // extern "C" |
| 43 #endif | 41 #endif // __cplusplus |
| 44 | 42 |
| 45 #endif // PUBLIC_FPDF_FLATTEN_H_ | 43 #endif // PUBLIC_FPDF_FLATTEN_H_ |
| OLD | NEW |