Foxit PDF SDK
|
Instance Methods | |
(FSRotation) | - getBaselineRotation: |
Get the text trend (as rotation) of a specified rectangle. More... | |
(int) | - getCharCount |
Get the count of all the characters. More... | |
(NSString *) | - getChars:count: |
Get all the characters within a range specified by a start index and count. More... | |
(int) | - getIndexAtPos:y:tolerance: |
Get the character index at or around a specified position on the page, in . More... | |
(NSString *) | - getTextInRect: |
Get the text within a rectangle, in . More... | |
(FSRectF *) | - getTextRect: |
Get the text rectangle by the index. More... | |
(FSRectFArray *) | - getTextRectArrayByRect: |
Get the array of all text rectangles within the specified rectangle region. More... | |
(int) | - getTextRectCount:count: |
Count the text rectangles within a range specified by a start index and count. More... | |
(FSRange *) | - getWordAtPos:y:tolerance: |
Get the character range of a word at or around a specified position on the page, in . More... | |
(id) | - initWithOther: |
Constructor, with another text page object. More... | |
(id) | - initWithPage:flags: |
Constructor, from a parsed PDF page. More... | |
(BOOL) | - isEmpty |
Check whether current object is empty or not. More... | |
PDF text page represents all the text contents in a PDF page, according to a specified parsing flag for these text. Class FSTextPage can be used to retrieve information about text in a PDF page, such as single character, single word, text content within specified character range or rectangle and so on.
This class object can also be used to construct objects of other text related classes in order to do more operation for text contents or access specified information from text contents:
- (FSRotation) getBaselineRotation: | (int) | rect_index |
Get the text trend (as rotation) of a specified rectangle.
[in] | rect_index | The index of the rectangle to be retrieved. Valid range: from 0 to (count -1). count is returned by function FSTextPage::getTextRectCount:count:. |
- (int) getCharCount |
Get the count of all the characters.
- (NSString *) getChars: | (int) | start | |
count: | (int) | count | |
Get all the characters within a range specified by a start index and count.
[in] | start | Index of start character, which is the first character of the expected text content. Valid range: from 0 to (charcount -1). charcount is returned by function FSTextPage::getCharCount. Default value: 0. |
[in] | count | Count of characters to be retrieved. -1 means to get the whole characters from start_index to the end of PDF page. Especially, when parameter count is larger than (charcount - start), all the rest character (from start_index) will be retrieved. charcount is returned by function FSTextPage::getCharCount. |
- (int) getIndexAtPos: | (float) | x | |
y: | (float) | y | |
tolerance: | (float) | tolerance | |
Get the character index at or around a specified position on the page, in .
[in] | x | Value of x position, in . |
[in] | y | Value of y position, in . |
[in] | tolerance | Tolerance value for character hit detection, in point units. This should not be a negative. |
- (NSString *) getTextInRect: | (FSRectF*) | rect |
Get the text within a rectangle, in .
[in] | rect | A rectangle region, in . |
- (FSRectF *) getTextRect: | (int) | rect_index |
Get the text rectangle by the index.
[in] | rect_index | The index of the rectangle to be retrieved. Valid range: from 0 to (count -1). count is returned by function FSTextPage::getTextRectCount:count:. |
- (FSRectFArray *) getTextRectArrayByRect: | (FSRectF*) | rect |
Get the array of all text rectangles within the specified rectangle region.
[in] | rect | A rectangle region, in . |
- (int) getTextRectCount: | (int) | start | |
count: | (int) | count | |
Count the text rectangles within a range specified by a start index and count.
[in] | start | Index of start character in the character index range. Valid range: from 0 to (charcount -1). charcount is returned by function FSTextPage::getCharCount. |
[in] | count | Count of characters in the character index range. -1 means to get the whole characters from start_index to the end of PDF page. |
- (FSRange *) getWordAtPos: | (float) | x | |
y: | (float) | y | |
tolerance: | (float) | tolerance | |
Get the character range of a word at or around a specified position on the page, in .
Currently, for Chinese/Japanese/Korean, only support to get a single character at or around the specified position.
[in] | x | Value of x position, in . |
[in] | y | Value of y position, in . |
[in] | tolerance | Tolerance value for word hit detection, in point units.This should not be a negative. |
- (id) initWithOther: | (FSTextPage*) | other |
Constructor, with another text page object.
[in] | other | Another text page object. |
- (id) initWithPage: | (FSPDFPage*) | page | |
flags: | (int) | flags | |
Constructor, from a parsed PDF page.
[in] | page | A valid PDF page object. This page should has been parsed. |
[in] | flags | Parsing flags for the text page. Please refer to values starting from FSTextPageParseTextNormal and this can be one or combination of these values. |
- (BOOL) isEmpty |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.