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 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame^] | 10 | // NOLINTNEXTLINE(build/include) |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 11 | #include "fpdfview.h" |
| 12 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame^] | 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 |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 19 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame^] | 20 | // Flatten for normal display. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 21 | #define FLAT_NORMALDISPLAY 0 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame^] | 22 | // Flatten for print. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 23 | #define FLAT_PRINT 1 |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 24 | |
| 25 | #ifdef __cplusplus |
| 26 | extern "C" { |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame^] | 27 | #endif // __cplusplus |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 28 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame^] | 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. |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 38 | DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag); |
| 39 | |
| 40 | #ifdef __cplusplus |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame^] | 41 | } // extern "C" |
| 42 | #endif // __cplusplus |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 43 | |
| 44 | #endif // PUBLIC_FPDF_FLATTEN_H_ |