| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef PUBLIC_FPDF_FLATTEN_H_ | 7 #ifndef PUBLIC_FPDF_FLATTEN_H_ |
| 8 #define PUBLIC_FPDF_FLATTEN_H_ | 8 #define PUBLIC_FPDF_FLATTEN_H_ |
| 9 | 9 |
| 10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
| 11 | 11 |
| 12 // Result codes. |
| 12 #define FLATTEN_FAIL 0 // Flatten operation failed. | 13 #define FLATTEN_FAIL 0 // Flatten operation failed. |
| 13 #define FLATTEN_SUCCESS 1 // Flatten operation succeed. | 14 #define FLATTEN_SUCCESS 1 // Flatten operation succeed. |
| 14 #define FLATTEN_NOTINGTODO 2 // There is nothing can be flatten. | 15 #define FLATTEN_NOTHINGTODO 2 // There is nothing to be flattened. |
| 16 |
| 17 // Flags. |
| 18 #define FLAT_NORMALDISPLAY 0 |
| 19 #define FLAT_PRINT 1 |
| 15 | 20 |
| 16 #ifdef __cplusplus | 21 #ifdef __cplusplus |
| 17 extern "C" { | 22 extern "C" { |
| 18 #endif | 23 #endif |
| 19 | 24 |
| 20 #define FLAT_NORMALDISPLAY 0 | 25 // Function: FPDFPage_Flatten |
| 21 #define FLAT_PRINT 1 | 26 // Make annotations and form fields become part of the page contents it
self. |
| 22 //Function: FPDFPage_Flatten | 27 // Parameters: |
| 23 | 28 // page - Handle to the page, as returned by FPDF_LoadPage(). |
| 24 // Flat a pdf page,annotations or form fields will become part of t
he page contents. | 29 // nFlag - Intended use of the flattened result: 0 for normal display,
1 for printing. |
| 25 //Parameters: | 30 // Return value: |
| 26 | 31 // Either FLATTEN_FAIL, FLATTEN_SUCCESS, or FLATTEN_NOTHINGTODO (see ab
ove). |
| 27 // page - Handle to the page. Returned by FPDF_LoadPage function. | 32 // Comments: |
| 28 // nFlag - the flag for the use of flatten result. Zero for normal
display, 1 for print. | 33 // Currently, all failures return FLATTEN_FAIL, with no indication for
the reason |
| 29 //Return value: | 34 // for the failure. The method does not support flattening any dynamic
XFA fields. |
| 30 // The result flag of the function, See flags above ( FLATTEN_FAIL,
FLATTEN_SUCCESS, FLATTEN_NOTINGTODO ). | 35 DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag); |
| 31 // | |
| 32 //Comments: Current version all fails return zero. If necessary we will assi
gn different value | |
| 33 // to indicate different fail reason. | |
| 34 // | |
| 35 //Notes: | |
| 36 // The method can not support to flatten the page which the documen
t consists of dynamic XFA fields. | |
| 37 // | |
| 38 DLLEXPORT int STDCALL FPDFPage_Flatten( FPDF_PAGE page, int nFlag); | |
| 39 | |
| 40 | 36 |
| 41 #ifdef __cplusplus | 37 #ifdef __cplusplus |
| 42 } | 38 } |
| 43 #endif | 39 #endif |
| 44 | 40 |
| 45 #endif // PUBLIC_FPDF_FLATTEN_H_ | 41 #endif // PUBLIC_FPDF_FLATTEN_H_ |
| OLD | NEW |