fpdf_flatten.h revision e6986e1e8d4a57987f47c215490cb080a65ee29a
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. 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. 16 17// Flags. 18#define FLAT_NORMALDISPLAY 0 19#define FLAT_PRINT 1 20 21#ifdef __cplusplus 22extern "C" { 23#endif 24 25// Function: FPDFPage_Flatten 26// Make annotations and form fields become part of the page contents itself. 27// Parameters: 28// page - Handle to the page, as returned by FPDF_LoadPage(). 29// nFlag - Intended use of the flattened result: 0 for normal display, 1 for printing. 30// Return value: 31// Either FLATTEN_FAIL, FLATTEN_SUCCESS, or FLATTEN_NOTHINGTODO (see above). 32// Comments: 33// Currently, all failures return FLATTEN_FAIL, with no indication for the reason 34// for the failure. 35DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag); 36 37#ifdef __cplusplus 38} 39#endif 40 41#endif // PUBLIC_FPDF_FLATTEN_H_ 42