fpdf_page_r.h
Go to the documentation of this file.
1 
26 #ifndef _FSPDF_PAGE_R_H_
27 #define _FSPDF_PAGE_R_H_
28 
82 #ifdef __cplusplus
83 extern "C" {
84 #endif
85 
86 /********************************************************************************/
87 /* Macros definition */
88 /* */
89 /* Page parsing flags, page rotation */
90 /********************************************************************************/
91 #ifndef _FSPDF_DEF_MACRO_PAGEPARSEFLAG_
92 #define _FSPDF_DEF_MACRO_PAGEPARSEFLAG_
93 
100 #define FSPDF_PAGEPARSEFLAG_NORMAL 0
101 
102 #define FSPDF_PAGEPARSEFLAG_TEXTONLY 1
103 
105 #endif /* _FSPDF_DEF_MACRO_PAGEPARSEFLAG_ */
106 
107 /*******************************************************************************/
108 /* Parse and clear PDF page */
109 /*******************************************************************************/
146 FS_RESULT FSPDF_Page_StartParse(FSCRT_PAGE page, FS_DWORD flag, FSCRT_PROGRESS* parseProgress);
147 
174 FS_RESULT FSPDF_Page_IsParsed(FSCRT_PAGE page, FS_BOOL* isParsed);
175 
200 FS_RESULT FSPDF_Page_Clear(FSCRT_PAGE page);
201 
202 /*******************************************************************************/
203 /* Access PDF page attributes */
204 /*******************************************************************************/
226 FS_RESULT FSPDF_Page_GetIndex(FSCRT_PAGE page, FS_INT32* index);
227 
252 FS_RESULT FSPDF_Page_GetSize(FSCRT_PAGE page, FS_FLOAT* width, FS_FLOAT* height);
253 
281 FS_RESULT FSPDF_Page_GetRotation(FSCRT_PAGE page, FS_INT32* rotation);
282 
312 FS_RESULT FSPDF_Page_GetBox(FSCRT_PAGE page, FS_INT32 boxType, FSCRT_RECTF* pageBox);
313 
339 FS_RESULT FSPDF_Page_GetDict(FSCRT_PAGE page, FSPDF_OBJECT* dictionary);
340 
363 FS_RESULT FSPDF_Page_EstimateContentSize(FSCRT_PAGE page, FS_DWORD* contentSize);
364 
393 FS_RESULT FSPDF_Page_HasTransparency(FSCRT_PAGE page, FS_BOOL* hasTransparency);
394 
395 /********************************************************************************/
396 /* Page trigger actions */
397 /********************************************************************************/
423 FS_RESULT FSPDF_Page_CountActions(FSCRT_PAGE page, FS_INT32 trigger, FS_INT32* count);
424 
452 FS_RESULT FSPDF_Page_GetAction(FSCRT_PAGE page, FS_INT32 trigger, FS_INT32 index, FSPDF_ACTIONDATA* actionData);
453 
475 FS_RESULT FSPDF_Page_DoJavaScriptAction(FSCRT_PAGE page, FS_INT32 trigger);
476 
477 /********************************************************************************/
478 /* Page transformation matrix */
479 /********************************************************************************/
512 FS_RESULT FSPDF_Page_GetMatrix(FSCRT_PAGE page, FS_INT32 x, FS_INT32 y, FS_INT32 width, FS_INT32 height, FS_INT32 rotation, FSCRT_MATRIX* matrix);
513 
538 FS_RESULT FSPDF_Matrix_TransformPageToDevice(FSCRT_MATRIX* matrix, const FSCRT_RECTF* srcRect, const FSCRT_RECT* dstRect, FS_INT32 rotation);
539 
564 FS_RESULT FSPDF_Matrix_TransformDeviceToPage(FSCRT_MATRIX* matrix, const FSCRT_RECT* srcRect, const FSCRT_RECTF* dstRect, FS_INT32 rotation);
565 
566 /*******************************************************************************/
567 /* Calculate content margin and page rendering */
568 /*******************************************************************************/
569 #ifndef _FSPDF_DEF_MACRO_PAGEMARGIN_
570 #define _FSPDF_DEF_MACRO_PAGEMARGIN_
571 
580 #define FSPDF_PAGEMARGIN_CONTENTSBBOX 0
581 
582 #define FSPDF_PAGEMARGIN_DETECTION 1
583 
585 #endif /* _FSCRT_DEF_MACRO_ERRCODE_ */
586 
613 FS_RESULT FSPDF_Page_CalcContentBBox(FSCRT_PAGE page, FS_INT32 mode, FSCRT_RECTF* rectBBox);
614 
640 FS_RESULT FSPDF_Page_GetThumbnail(FSCRT_PAGE page, FSCRT_BITMAP* thumbnail);
641 
642 #ifndef _FSPDF_DEF_MACRO_PAGERENDERFLAG_
643 #define _FSPDF_DEF_MACRO_PAGERENDERFLAG_
644 
651 #define FSPDF_PAGERENDERFLAG_NORMAL 0
652 
653 #define FSPDF_PAGERENDERFLAG_QUICKDRAW 1
654 
656 #endif /* _FSPDF_DEF_MACRO_PAGERENDERFLAG_ */
657 
695 FS_RESULT FSPDF_RenderContext_StartPage(FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer,
696  FSCRT_PAGE page, FS_INT32 flag, FSCRT_PROGRESS* renderProgress);
697 
698 #ifdef __cplusplus
699 };
700 #endif
701  /* group FPDFPAGE */
703 
704 #endif /* _FSPDF_PAGE_R_H_ */
705 
FS_RESULT FSPDF_Page_GetDict(FSCRT_PAGE page, FSPDF_OBJECT *dictionary)
Get the PDF page dictionary object.
FS_RESULT FSPDF_Page_CountActions(FSCRT_PAGE page, FS_INT32 trigger, FS_INT32 *count)
Count trigger actions of a PDF page.
FS_RESULT FSPDF_Page_GetSize(FSCRT_PAGE page, FS_FLOAT *width, FS_FLOAT *height)
Get page size.
Structure for rectangle, in float.
Definition: fs_base_r.h:2078
float FS_FLOAT
32-bit floating-point number, single precision.
Definition: fs_base_r.h:148
Structure for rectangle, in integer.
Definition: fs_base_r.h:2056
FS_RESULT FSPDF_Page_HasTransparency(FSCRT_PAGE page, FS_BOOL *hasTransparency)
Check whether a PDF page has transparency.
FS_RESULT FSPDF_Page_IsParsed(FSCRT_PAGE page, FS_BOOL *isParsed)
Determine whether page has been parsed or not.
FS_RESULT FSPDF_Page_CalcContentBBox(FSCRT_PAGE page, FS_INT32 mode, FSCRT_RECTF *rectBBox)
Calculate content box rectangle in PDF page.
unsigned int FS_DWORD
32-bit unsigned integer.
Definition: fs_base_r.h:142
FS_RESULT FSPDF_Matrix_TransformPageToDevice(FSCRT_MATRIX *matrix, const FSCRT_RECTF *srcRect, const FSCRT_RECT *dstRect, FS_INT32 rotation)
Get a transformation matrix from PDF page coordinate to device coordinate.
FS_RESULT FSPDF_Page_EstimateContentSize(FSCRT_PAGE page, FS_DWORD *contentSize)
Estimate the size of PDF page content.
int FS_INT32
32-bit signed integer.
Definition: fs_base_r.h:175
FS_RESULT FSPDF_RenderContext_StartPage(FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer, FSCRT_PAGE page, FS_INT32 flag, FSCRT_PROGRESS *renderProgress)
Start rendering a PDF page in a renderer with a PDF rendering context.
FS_RESULT FSPDF_Matrix_TransformDeviceToPage(FSCRT_MATRIX *matrix, const FSCRT_RECT *srcRect, const FSCRT_RECTF *dstRect, FS_INT32 rotation)
Get a transformation matrix from device coordinate to PDF page coordinate.
FS_RESULT FSPDF_Page_StartParse(FSCRT_PAGE page, FS_DWORD flag, FSCRT_PROGRESS *parseProgress)
Start parsing a PDF page.
Structure for an action data.
Definition: fpdf_base_r.h:841
FS_RESULT FSPDF_Page_GetAction(FSCRT_PAGE page, FS_INT32 trigger, FS_INT32 index, FSPDF_ACTIONDATA *actionData)
Get a trigger action of a PDF page.
int FS_BOOL
Boolean type (This should be TRUE or FALSE).
Definition: fs_base_r.h:133
FS_RESULT FSPDF_Page_Clear(FSCRT_PAGE page)
Release all page contents and related resources.
FS_RESULT FSPDF_Page_GetMatrix(FSCRT_PAGE page, FS_INT32 x, FS_INT32 y, FS_INT32 width, FS_INT32 height, FS_INT32 rotation, FSCRT_MATRIX *matrix)
Get page transformation matrix.
Structure for 2D matrix.
Definition: fs_base_r.h:2130
FS_RESULT FSPDF_Page_GetIndex(FSCRT_PAGE page, FS_INT32 *index)
Get page index.
FS_RESULT FSPDF_Page_GetBox(FSCRT_PAGE page, FS_INT32 boxType, FSCRT_RECTF *pageBox)
Get page boundary which is a rectangle type value.
FS_RESULT FSPDF_Page_GetThumbnail(FSCRT_PAGE page, FSCRT_BITMAP *thumbnail)
Get the thumbnail bitmap from a page.
FS_RESULT FSPDF_Page_DoJavaScriptAction(FSCRT_PAGE page, FS_INT32 trigger)
Perform the page javascript which is specified by the trigger.
FS_RESULT FSPDF_Page_GetRotation(FSCRT_PAGE page, FS_INT32 *rotation)
Get page rotation.
int FS_RESULT
Result code for functions in Foxit PDF SDK.
Definition: fs_base_r.h:160

Foxit Corporation