Files |
| file | fpdfppo.h |
| | Header file for the page module - provides the interfaces for page manipulation.
|
Defines |
|
#define | FLATTEN_FAIL 0 |
| | Flatten operation failed.
|
|
#define | FLATTEN_SUCCESS 1 |
| | Flatten operation succeed.
|
|
#define | FLATTEN_NOTINGTODO 2 |
| | There is nothing to flatten.
|
|
#define | FLAT_NORMALDISPLAY 0 |
|
#define | FLAT_PRINT 1 |
Functions |
| DLLEXPORT FPDF_BOOL STDCALL | FPDF_ImportPages (FPDF_DOCUMENT dest_doc, FPDF_DOCUMENT src_doc, FPDF_BYTESTRING pagerange, int index) |
| DLLEXPORT int STDCALL | FPDFPage_Flatten (FPDF_PAGE page, int nFlag) |
| DLLEXPORT FPDF_BOOL STDCALL | FPDFPage_GetRectangle (FPDF_PAGE page, int iRect, double *left, double *right, double *bottom, double *top) |
| DLLEXPORT FPDF_BOOL STDCALL | FPDFPage_SetRectangle (FPDF_PAGE page, int iRect, double left, double right, double bottom, double top) |
| DLLEXPORT int STDCALL | FPDFPage_GetRotation (FPDF_PAGE page) |
| DLLEXPORT void STDCALL | FPDFPage_SetRotation (FPDF_PAGE page, int rotate) |
| | _FPDFPPO_H_
|
Detailed Description
Header file for the page module
Function Documentation
Import some pages to a PDF document.
- Parameters:
-
| [in] | dest_doc | - The handle to the destination document which add the pages. |
| [in] | src_doc | - The handle to the document to be imported. |
| [in] | pagerange | - A page range string, Such as "1,3,5-7". If this parameter is NULL, it would import all pages in src_doc. |
| [in] | index | - The page index where imported pages are added. |
- Return values:
-
| TRUE | for success, otherwise FALSE. |
| DLLEXPORT int STDCALL FPDFPage_Flatten |
( |
FPDF_PAGE |
page, |
|
|
int |
nFlag |
|
) |
| |
Flatting a PDF page, annotations or form fields will make it a part of the page contents.
- Parameters:
-
| [in] | page | - Handle to the page. Return by FPDF_LoadPage function. |
- Note:
- Currently all version's fails return zero. If necessary we will assign different value to indicate different fail reason.
- Return values:
-
| The | result flag of the function, See flags above. |
| DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetRectangle |
( |
FPDF_PAGE |
page, |
|
|
int |
iRect, |
|
|
double * |
left, |
|
|
double * |
right, |
|
|
double * |
bottom, |
|
|
double * |
top |
|
) |
| |
Get a page rectangle, in points(1 point equals 1/72 inch).
- Parameters:
-
| [in] | page | - Handle to a page. Returned by FPDFPage_New. |
| [in] | iRect | - The index values for getting boxes. Refer to the fpdfeditbase.h, the definition of getting boxes. |
| [in] | left | - Pointer to a double number receiving the left of a rectangle (in points). |
| [in] | right | - Pointer to a double number receiving the right of a rectangle (in points). |
| [in] | bottom | - Pointer to a double number receiving the bottom of a rectangle (in points). |
| [in] | top | - Pointer to a double number receiving the top of a rectangle (in points). |
- Return values:
-
| TRUE | if successful, FALSE otherwise. |
| DLLEXPORT int STDCALL FPDFPage_GetRotation |
( |
FPDF_PAGE |
page | ) |
|
Get the page rotation.
- Parameters:
-
| [in] | page | - Handle to a page. Returned by FPDFPage_New. |
- Note:
- The PDF page rotation is rotated clockwise.
- Return values:
-
| The | PDF page rotation. One of following values will be returned: 0(0), 1(90), 2(180), 3(270). |
| DLLEXPORT FPDF_BOOL STDCALL FPDFPage_SetRectangle |
( |
FPDF_PAGE |
page, |
|
|
int |
iRect, |
|
|
double |
left, |
|
|
double |
right, |
|
|
double |
bottom, |
|
|
double |
top |
|
) |
| |
Set a page rectangle, in points (1 point equals 1/72 inch).
- Parameters:
-
| [in] | page | - Handle to a page. Returned by FPDFPage_New. |
| [in] | iRect | - The index values for getting boxes are defined above. |
| [in] | left | - The left coordinate of a rectangle (in points). |
| [in] | right | - The right coordinate of a rectangle (in points). |
| [in] | bottom | - The bottom coordinate of a rectangle (in points). |
| [in] | top | - The top coordinate of a rectangle (in points). |
- Note:
- After using this method, the content in the page will be changed, but not loaded. You must call the FPDF_LoadPage to reload the page.
- Return values:
-
| TRUE | if successful, FALSE otherwise. |
| DLLEXPORT void STDCALL FPDFPage_SetRotation |
( |
FPDF_PAGE |
page, |
|
|
int |
rotate |
|
) |
| |
_FPDFPPO_H_
Set page rotation. One of following values will be set: 0(0), 1(90), 2(180), 3(270).
- Parameters:
-
| [in] | page | - Handle to a page. Returned by FPDFPage_New. |
| [in] | rotate | - The value of the PDF page rotation. |
- Note:
- The PDF page rotation is rotated clockwise. After using this method, the content in this page will be changed, but not loaded. You must call the FPDF_LoadPage to reload the page.
- Return values:
-