Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 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 | #include "fpdfview.h" |
| 11 | |
| 12 | // Result codes. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame^] | 13 | #define FLATTEN_FAIL 0 // Flatten operation failed. |
| 14 | #define FLATTEN_SUCCESS 1 // Flatten operation succeed. |
| 15 | #define FLATTEN_NOTHINGTODO 2 // There is nothing to be flattened. |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 16 | |
| 17 | // Flags. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame^] | 18 | #define FLAT_NORMALDISPLAY 0 |
| 19 | #define FLAT_PRINT 1 |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 20 | |
| 21 | #ifdef __cplusplus |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
| 25 | // Function: FPDFPage_Flatten |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame^] | 26 | // Make annotations and form fields become part of the page contents |
| 27 | // itself. |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 28 | // Parameters: |
| 29 | // page - Handle to the page, as returned by FPDF_LoadPage(). |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame^] | 30 | // nFlag - Intended use of the flattened result: 0 for normal display, |
| 31 | // 1 for printing. |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 32 | // Return value: |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame^] | 33 | // Either FLATTEN_FAIL, FLATTEN_SUCCESS, or FLATTEN_NOTHINGTODO (see |
| 34 | // above). |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 35 | // Comments: |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame^] | 36 | // Currently, all failures return FLATTEN_FAIL, with no indication for |
| 37 | // the reason |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 38 | // for the failure. |
| 39 | DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag); |
| 40 | |
| 41 | #ifdef __cplusplus |
| 42 | } |
| 43 | #endif |
| 44 | |
| 45 | #endif // PUBLIC_FPDF_FLATTEN_H_ |