fpdf_reflow_r.h
Go to the documentation of this file.
1 
26 #ifndef _FSPDF_REFLOW_R_H_
27 #define _FSPDF_REFLOW_R_H_
28 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 /*******************************************************************************/
69 /* Base Definitions for Reflow */
70 /* */
71 /* Handle definitions, macro definitions */
72 /*******************************************************************************/
73 #ifndef _FSPDF_DEF_HANDLE_REFLOWPAGE_
74 #define _FSPDF_DEF_HANDLE_REFLOWPAGE_
75 
77 FSCRT_DEFINEHANDLE(FSPDF_REFLOWPAGE);
78 
79 #endif /* _FSPDF_DEF_HANDLE_REFLOWPAGE_ */
80 
81 #ifndef _FSPDF_DEF_MACRO_REFLOWFLAG_
82 #define _FSPDF_DEF_MACRO_REFLOWFLAG_
83 
89 #define FSPDF_REFLOWFLAG_NORMAL 0x0
90 
91 #define FSPDF_REFLOWFLAG_IMAGE 0x1
92 
100 #define FSPDF_REFLOWFLAG_NOTRUNCATE 0x2
101 
103 #endif /* _FSPDF_DEF_MACRO_REFLOWFLAG_ */
104 
105 /*******************************************************************************/
106 /* PDF page reflow */
107 /*******************************************************************************/
135 FS_RESULT FSPDF_ReflowPage_Create(FSCRT_PAGE pdfPage, FSPDF_REFLOWPAGE* reflowPage);
136 
156 FS_RESULT FSPDF_ReflowPage_Release(FSPDF_REFLOWPAGE reflowPage);
157 
179 FS_RESULT FSPDF_ReflowPage_SetSize(FSPDF_REFLOWPAGE reflowPage, FS_FLOAT width, FS_FLOAT height);
180 
200 FS_RESULT FSPDF_ReflowPage_SetLineSpace(FSPDF_REFLOWPAGE reflowPage, FS_FLOAT lineSpace);
201 
223 FS_RESULT FSPDF_ReflowPage_SetTopSpace(FSPDF_REFLOWPAGE reflowPage, FS_FLOAT topSpace);
224 
263 FS_RESULT FSPDF_ReflowPage_StartParse(FSPDF_REFLOWPAGE reflowPage, FS_DWORD flags, FSCRT_PROGRESS* reflowProgress);
264 
265 /*******************************************************************************/
266 /* Rendering of PDF reflow */
267 /*******************************************************************************/
290 FS_RESULT FSPDF_ReflowPage_GetContentSize(FSPDF_REFLOWPAGE reflowPage, FS_FLOAT* width, FS_FLOAT* height);
291 
327 FS_RESULT FSPDF_ReflowPage_GetMatrix(FSPDF_REFLOWPAGE reflowPage, FS_INT32 x, FS_INT32 y, FS_INT32 width, FS_INT32 height,
328  FS_INT32 rotation, FSCRT_MATRIX* matrix);
329 
367 FS_RESULT FSPDF_RenderContext_StartReflowPage(FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer,
368  FSPDF_REFLOWPAGE reflowPage, FSCRT_PROGRESS* renderProgress);
369 
370 /*******************************************************************************/
371 /* Data of reflowed page */
372 /*******************************************************************************/
404 FS_RESULT FSPDF_ReflowPage_GetFocusData(FSPDF_REFLOWPAGE reflowPage, const FSCRT_MATRIX* matrix, FS_INT32 x, FS_INT32 y, FSCRT_BSTR* focusData);
405 
439 FS_RESULT FSPDF_ReflowPage_GetFocusPosition(FSPDF_REFLOWPAGE reflowPage, const FSCRT_MATRIX* matrix, const FSCRT_BSTR* focusData,
440  FS_INT32* x, FS_INT32* y);
441 
442 #ifdef __cplusplus
443 };
444 #endif
445  /* group FPDFREFLOW */
447 
448 #endif /* _FSPDF_REFLOW_H_ */
449 
float FS_FLOAT
32-bit floating-point number, single precision.
Definition: fs_base_r.h:148
FS_RESULT FSPDF_ReflowPage_StartParse(FSPDF_REFLOWPAGE reflowPage, FS_DWORD flags, FSCRT_PROGRESS *reflowProgress)
Start parsing process for a reflow page.
FS_RESULT FSPDF_ReflowPage_GetFocusData(FSPDF_REFLOWPAGE reflowPage, const FSCRT_MATRIX *matrix, FS_INT32 x, FS_INT32 y, FSCRT_BSTR *focusData)
Get focus data corresponding to a given position in device coordinate system.
FS_RESULT FSPDF_ReflowPage_SetTopSpace(FSPDF_REFLOWPAGE reflowPage, FS_FLOAT topSpace)
Set the top space of page before calling function FSPDF_ReflowPage_StartParse.
FS_RESULT FSPDF_ReflowPage_GetFocusPosition(FSPDF_REFLOWPAGE reflowPage, const FSCRT_MATRIX *matrix, const FSCRT_BSTR *focusData, FS_INT32 *x, FS_INT32 *y)
Get a point of a position in device coordinate system corresponding to a given focus data...
unsigned int FS_DWORD
32-bit unsigned integer.
Definition: fs_base_r.h:142
int FS_INT32
32-bit signed integer.
Definition: fs_base_r.h:175
FS_RESULT FSPDF_ReflowPage_GetMatrix(FSPDF_REFLOWPAGE reflowPage, FS_INT32 x, FS_INT32 y, FS_INT32 width, FS_INT32 height, FS_INT32 rotation, FSCRT_MATRIX *matrix)
Get matrix of a reflow page.
FS_RESULT FSPDF_ReflowPage_SetLineSpace(FSPDF_REFLOWPAGE reflowPage, FS_FLOAT lineSpace)
Set line space before calling function FSPDF_ReflowPage_StartParse.
FS_RESULT FSPDF_RenderContext_StartReflowPage(FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer, FSPDF_REFLOWPAGE reflowPage, FSCRT_PROGRESS *renderProgress)
Start rendering a reflow page.
FS_RESULT FSPDF_ReflowPage_Create(FSCRT_PAGE pdfPage, FSPDF_REFLOWPAGE *reflowPage)
Create a reflow page from a PDF page.
FS_RESULT FSPDF_ReflowPage_SetSize(FSPDF_REFLOWPAGE reflowPage, FS_FLOAT width, FS_FLOAT height)
Set screen size before calling function FSPDF_ReflowPage_StartParse.
FS_RESULT FSPDF_ReflowPage_Release(FSPDF_REFLOWPAGE reflowPage)
Release all resources allocated for a PDF reflow page handle.
Structure for 2D matrix.
Definition: fs_base_r.h:2130
Structure for byte string.
Definition: fs_base_r.h:611
FS_RESULT FSPDF_ReflowPage_GetContentSize(FSPDF_REFLOWPAGE reflowPage, FS_FLOAT *width, FS_FLOAT *height)
Get width and height of a reflow page after calling function FSPDF_ReflowPage_StartParse.
int FS_RESULT
Result code for functions in Foxit PDF SDK.
Definition: fs_base_r.h:160

Foxit Corporation