|
| ReflowPage (PDFPage page) |
| Constructor, from a parsed PDF page. More...
|
|
| ReflowPage (ReflowPage other) |
| Constructor, with another reflow page object. More...
|
|
float | GetContentHeight () |
| Get content height after current reflow page object has been parsed. More...
|
|
float | GetContentWidth () |
| Get content width after current reflow page object has been parsed. More...
|
|
Matrix2D | GetDisplayMatrix (float offset_x, float offset_y, int width, int height, Rotation rotate) |
| Get the display matrix, according to the offset of top side between current reflow page and screen. More...
|
|
string | GetFocusData (Matrix2D matrix, PointF point) |
| Get focus data corresponding to a given position in device coordinate system. More...
|
|
PointF | GetFocusPosition (Matrix2D matrix, string focus_data) |
| Get the position in device coordinate system corresponding to a given focus data. More...
|
|
bool | IsEmpty () |
| Check whether current object is empty or not. More...
|
|
bool | IsParsed () |
| Check if current reflow page has been parsed or not. More...
|
|
void | SetImageScale (float image_scale) |
| Set image scale. This can be called before calling function ReflowPage.StartParse . More...
|
|
void | SetLineSpace (float line_space) |
| Set line space. This can be called before calling function ReflowPage.StartParse . More...
|
|
void | SetParseFlags (int flags) |
| Set the parsing flag. This can be called before calling function ReflowPage.StartParse . More...
|
|
void | SetScreenMargin (int left, int top, int right, int bottom) |
| Set margin. This can be called before calling function ReflowPage.StartParse . More...
|
|
void | SetScreenSize (float width, float height) |
| Set screen size. This should be called before calling function ReflowPage.StartParse . More...
|
|
void | SetTopSpace (float top_space) |
| Set the top space. This can be called before calling function ReflowPage.StartParse . More...
|
|
void | SetZoom (int zoom) |
| Set zoom factor. This can be called before calling function ReflowPage.StartParse . More...
|
|
Progressive | StartParse (PauseCallback pause) |
| Start to parse current reflow page. More...
|
|
In order to display page contents in a small screen device, Foxit PDF SDK introduces the concept of "reflow page". In the reflow page, original PDF page contents will be laid out to fit the specified screen size.
For a PDF page, user may wants to keep focusing on a location in the reflow page when user switches between this PDF page and its related reflow page, or switch among these related reflow pages which are in different size. In order to track the focus location, Foxit PDF SDK uses "focus data" to represent the focus location. Focus data is similar to bookmark or destination in PDF, but it is simpler. User can store the focus data (or save the data to file) so that use can retrieved the focus location again by the focus data later, even if the size of reflow page is changed.
A reflow page object should be constructed from a parsed PDF page. This class offers functions to:
-
Start to parse a reflow page by functions ReflowPage.StartParse . Before paring a reflow page, use should use function ReflowPage.SetScreenSize to specify the screen size for the reflow page. User can also use following functions to specify other factors which will affect on the parsing result for the reflow page: ReflowPage.SetZoom , ReflowPage.SetParseFlags , ReflowPage.SetLineSpace , ReflowPage::SeImageScale, ReflowPage.SetTopSpace . If these function are not called before parsing a reflow page, default values will be used. Please refer to comment of these functions for more details.
-
Get the actual content size and matrix of a parsed reflow page, by functions ReflowPage.GetContentWidth , ReflowPage.GetContentHeight ,ReflowPage.GetDisplayMatrix .
-
Get the focus data for a specified position in reflow page, by function ReflowPage.GetFocusData , or retrieve the position by a focus data, by function ReflowPage.GetFocusPosition .
To render the reflow page, please use function common.Renderer.StartRenderReflowPage .
- See also
- PDFPage
-
foxit.common.Renderer
string foxit.pdf.ReflowPage.GetFocusData |
( |
Matrix2D |
matrix, |
|
|
PointF |
point |
|
) |
| |
|
inline |
Get focus data corresponding to a given position in device coordinate system.
This function can only be used when reflow page has been parsed.
Focus data, similar to bookmark or destination in PDF, is used to locate the position of a specified content in reflow page. For a PDF page, position of a specified content is fixed and will not be changed even if the size of related reflow page is changed. So focus data can be used to locate the same content from a PDF page in its related reflow pages with different sizes but same reflow content.
Usually, user can call function ReflowPage.GetFocusData to get focus data for a specified location, and store the focus data. When the reflow page's size is changed, user can use the stored focus data in function ReflowPage.GetFocusPosition to get the new position and then still focus on or near the same content.
- Parameters
-
[in] | matrix | A matrix returned by function ReflowPage.GetDisplayMatrix . |
[in] | point | The point of a specified position, in device coordinate system. |
- Returns
- The focus data.
PointF foxit.pdf.ReflowPage.GetFocusPosition |
( |
Matrix2D |
matrix, |
|
|
string |
focus_data |
|
) |
| |
|
inline |
Get the position in device coordinate system corresponding to a given focus data.
This function can only be used when reflow page has been parsed.
Focus data, similar to bookmark or destination in PDF, is used to locate the position of a specified content in reflow page. For a PDF page, position of a specified content is fixed and will not be changed even if the size of related reflow page is changed. So focus data can be used to locate the same content from a PDF page in its related reflow pages with different sizes but same reflow content.
Usually, user can call function ReflowPage.GetFocusData to get focus data for a specified location, and store the focus data. When the reflow page's size is changed, user can use the stored focus data in function ReflowPage.GetFocusPosition to get the new position and then still focus on or near the same content.
- Parameters
-
[in] | matrix | A matrix returned by function ReflowPage.GetDisplayMatrix . |
[in] | focus_data | Focus data used to get its corresponding position in device coordinate system, with specified matrix. This is retrieved by previous calling of function ReflowPage.GetFocusData . |
- Returns
- The position in device coordinate system.
void foxit.pdf.ReflowPage.SetScreenMargin |
( |
int |
left, |
|
|
int |
top, |
|
|
int |
right, |
|
|
int |
bottom |
|
) |
| |
|
inline |
Set margin. This can be called before calling function ReflowPage.StartParse .
If no margin has ever been set to current reflow page, Foxit PDF SDK will use value (0, 0, 0, 0) as default margin.
If new margin is set, the new margin will take effect until current reflow page has been re-parsed and rendered again.
- Parameters
-
[in] | left | The left margin. This value should between 0 and (screen width / 3). |
[in] | top | The left margin. This value should between 0 and (screen height/ 3). |
[in] | right | The left margin. This value should between 0 and (screen width / 3). |
[in] | bottom | The left margin. This value should between 0 and (screen height / 3). |
- Returns
- None.