blob: c1e354e906757d9a018d617d7a54645c71d8635f [file] [log] [blame]
Svet Ganove6986e12015-06-04 14:52:15 -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.
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. Moltmann4d3acf42017-03-20 11:05:52 -070010// NOLINTNEXTLINE(build/include)
Svet Ganove6986e12015-06-04 14:52:15 -070011#include "fpdfview.h"
12
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -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
Svet Ganove6986e12015-06-04 14:52:15 -070019
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070020// Flatten for normal display.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080021#define FLAT_NORMALDISPLAY 0
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070022// Flatten for print.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080023#define FLAT_PRINT 1
Svet Ganove6986e12015-06-04 14:52:15 -070024
25#ifdef __cplusplus
26extern "C" {
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070027#endif // __cplusplus
Svet Ganove6986e12015-06-04 14:52:15 -070028
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -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.
Svet Ganove6986e12015-06-04 14:52:15 -070038DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag);
39
40#ifdef __cplusplus
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070041} // extern "C"
42#endif // __cplusplus
Svet Ganove6986e12015-06-04 14:52:15 -070043
44#endif // PUBLIC_FPDF_FLATTEN_H_