blob: 614540e1563bc2d3076ff0289ea2d66da2803637 [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001// 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 Sepez9857e202015-05-13 17:09:26 -07004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Tom Sepez9857e202015-05-13 17:09:26 -07007#ifndef PUBLIC_FPDF_FLATTEN_H_
8#define PUBLIC_FPDF_FLATTEN_H_
9
Dan Sinclair85c8e7f2016-11-21 13:50:32 -050010// NOLINTNEXTLINE(build/include)
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070011#include "fpdfview.h"
12
dsinclair860193b2016-04-25 19:44:20 -070013// 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 Sepez3c3201f2015-05-20 10:20:35 -070019
dsinclair860193b2016-04-25 19:44:20 -070020// Flatten for normal display.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070021#define FLAT_NORMALDISPLAY 0
dsinclair860193b2016-04-25 19:44:20 -070022// Flatten for print.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070023#define FLAT_PRINT 1
Tom Sepez9857e202015-05-13 17:09:26 -070024
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070025#ifdef __cplusplus
26extern "C" {
dsinclair860193b2016-04-25 19:44:20 -070027#endif // __cplusplus
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070028
dsinclair860193b2016-04-25 19:44:20 -070029// 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 Sinclair00d2ad12017-08-10 14:13:02 -040038FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag);
Tom Sepez9857e202015-05-13 17:09:26 -070039
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070040#ifdef __cplusplus
dsinclair860193b2016-04-25 19:44:20 -070041} // extern "C"
42#endif // __cplusplus
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070043
Tom Sepez9857e202015-05-13 17:09:26 -070044#endif // PUBLIC_FPDF_FLATTEN_H_