John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -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. |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 4 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 7 | #ifndef PUBLIC_FPDF_FLATTEN_H_ |
| 8 | #define PUBLIC_FPDF_FLATTEN_H_ |
| 9 | |
Dan Sinclair | 85c8e7f | 2016-11-21 13:50:32 -0500 | [diff] [blame] | 10 | // NOLINTNEXTLINE(build/include) |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 11 | #include "fpdfview.h" |
| 12 | |
dsinclair | 860193b | 2016-04-25 19:44:20 -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 |
Tom Sepez | 3c3201f | 2015-05-20 10:20:35 -0700 | [diff] [blame] | 19 | |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 20 | // Flatten for normal display. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 21 | #define FLAT_NORMALDISPLAY 0 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 22 | // Flatten for print. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 23 | #define FLAT_PRINT 1 |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 24 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 25 | #ifdef __cplusplus |
| 26 | extern "C" { |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 27 | #endif // __cplusplus |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 28 | |
dsinclair | 860193b | 2016-04-25 19:44:20 -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. |
Dan Sinclair | 00d2ad1 | 2017-08-10 14:13:02 -0400 | [diff] [blame] | 38 | FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag); |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 39 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 40 | #ifdef __cplusplus |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 41 | } // extern "C" |
| 42 | #endif // __cplusplus |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 43 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 44 | #endif // PUBLIC_FPDF_FLATTEN_H_ |