|
| | constructor (page) |
| | Constructor, from a parsed PDF page. More...
|
| |
| | GetContentHeight () |
| | Get content height after current reflow page object has been parsed. More...
|
| |
| | GetContentWidth () |
| | Get content width after current reflow page object has been parsed. More...
|
| |
| | GetDisplayMatrix (offset_x, offset_y, width, height, rotate) |
| | Get the display matrix, according to the offset of top side between current reflow page and screen. More...
|
| |
| | GetFocusData (matrix, point) |
| | Get focus data corresponding to a given position in device coordinate system. More...
|
| |
| | GetFocusPosition (matrix, focus_data) |
| | Get the position in device coordinate system corresponding to a given focus data. More...
|
| |
| | IsEmpty () |
| | Check whether current object is empty or not. More...
|
| |
| | IsParsed () |
| | Check if current reflow page has been parsed or not. More...
|
| |
| | SetImageScale (image_scale) |
| | Set image scale. This can be called before calling function FSDK.ReflowPage.StartParse. More...
|
| |
| | SetLineSpace (line_space) |
| | Set line space. This can be called before calling function FSDK.ReflowPage.StartParse. More...
|
| |
| | SetParseFlags (flags) |
| | Set the parsing flag. This can be called before calling function FSDK.ReflowPage.StartParse. More...
|
| |
| | SetScreenMargin (left, top, right, bottom) |
| | Set margin. This can be called before calling function FSDK.ReflowPage.StartParse. More...
|
| |
| | SetScreenSize (width, height) |
| | Set screen size. This should be called before calling functions FSDK.ReflowPage.StartParse and FSDK.ReflowPage.SetLineSpace. More...
|
| |
| | SetTopSpace (top_space) |
| | Set the top space. This can be called before calling function FSDK.ReflowPage.StartParse. More...
|
| |
| | SetZoom (zoom) |
| | Set zoom factor. This can be called before calling function FSDK.ReflowPage.StartParse. More...
|
| |
| | StartParse (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 user can retrieve 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 FSDK.ReflowPage.StartParse. Before parsing a reflow page, use should use function FSDK.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: FSDK.ReflowPage.SetZoom, FSDK.ReflowPage.SetParseFlags, FSDK.ReflowPage.SetLineSpace, FSDK.ReflowPage.SetImageScale, FSDK.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 FSDK.ReflowPage.GetContentWidth, FSDK.ReflowPage.GetContentHeight,FSDK.ReflowPage.GetDisplayMatrix.
-
Get the focus data for a specified position in reflow page, by function FSDK.ReflowPage.GetFocusData, or retrieve the position by a focus data, by function FSDK.ReflowPage.GetFocusPosition.
To render the reflow page, please use function FSDK.Renderer.StartRenderReflowPage.
- See also
- FSDK.PDFPage
-
FSDK.Renderer
| FSDK.ReflowPage.GetFocusData |
( |
|
matrix, |
|
|
|
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 FSDK.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 FSDK.ReflowPage.GetFocusPosition to get the new position and then still focus on or near the same content.
- Parameters
-
- Returns
- The focus data.
| FSDK.ReflowPage.GetFocusPosition |
( |
|
matrix, |
|
|
|
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 FSDK.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 FSDK.ReflowPage.GetFocusPosition to get the new position and then still focus on or near the same content.
- Parameters
-
- Returns
- The position in device coordinate system.
| FSDK.ReflowPage.e_NoTruncate |
|
static |
Parsing flag to decide whether to allow to truncate the first/last image or line of text within the specified screen size or not.
The height of final parsed reflow page may be larger than the actual screen height. In this case, the content of a reflow page would be shown in more than one screen in application.
Application may use following modes to show such reflow page:
-
Show only part of content of the reflow page in the screen in one time. When user clicks or taps, show the previous or next part of content. This is like to turn to a page in a real book. Here, call this mode as "single screen mode".
-
Show the reflow page continuously – that means user can scroll the screen to see any part of content in this reflow page. Here, call this mode as "scroll screen mode".
If use "single screen mode" to show a reflow page, a truncate problem may occurs: the first line of text or image just shows the bottom half in the top of the screen, or the last line of text of image just shows the top half in the bottom of the screen. This flag can be set to avoid such problem.
If use "scroll screen mode", no need to use this flag.