Class to represent text page. More...
Public Member Functions | |
Boolean | Release () |
Release all resources. More... | |
Int32 | CountChars () |
Get count of characters in current text page. More... | |
String^ | GetChars (CharRange^ charRange) |
Get text content in current text page, within a specified character range. More... | |
CharInfo^ | GetCharInfo (Int32 charIndex) |
Get character information of a specific character. More... | |
Int32 | GetCharIndexAtPos (float x, float y, float tolerance) |
Get the character index at or near a specific position in PDF page. More... | |
TextSelection^ | SelectByRange (CharRange^ charRange) |
Get a text selection object by a specified character range. More... | |
TextSelection^ | SelectByRectangle (RectF^ rect) |
Get a text selection handle by specific rectangle. More... | |
TextSearch^ | StartSearch (String^ searchPattern, UInt32 flags, Int32 startIndex) |
Start a PDF text search process. More... | |
Int32 | CountLinks () |
Count the URL formatted texts in current text page. More... | |
String^ | GetLink (Int32 linkIndex) |
Get the linked URL associated with a specific hyperlink. More... | |
TextSelection^ | GetLinkSelection (Int32 linkIndex) |
Get a text selection object for a specific hyperlink. More... | |
Properties | |
Int64 | pointer |
Pointer to a handle of PDF text page object. This pointer is not useful outside this SDK. The application should not access the pointer to the handle of the PDF text page object directly. | |
Int64 | linkPointer |
Pointer to a handle of PDF text link internal object. This pointer is not useful outside this SDK. The application should not access the pointer to the handle of the PDF text link object directly. | |
Class to represent text page.
Text page contains all the text contents of a PDF page and can be used for text related operation such as retrieving characters data or text content, starting to search text, selecting some text and etc. Text page object can be loaded by function Page::LoadTextPage.
Int32 Foxit::PDF::TextPage::CountChars | ( | ) |
Get count of characters in current text page.
Generated characters, such as additional space and new line characters, are also counted.
Characters in a page are from a "stream". Inside the stream, each character has an index. This index is used in most PDF text page related functions and the first character in the page has an index value of zero.
Int32 Foxit::PDF::TextPage::CountLinks | ( | ) |
Count the URL formatted texts in current text page.
Int32 Foxit::PDF::TextPage::GetCharIndexAtPos | ( | float | x, |
float | y, | ||
float | tolerance | ||
) |
Get the character index at or near a specific position in PDF page.
[in] | x | Value of x position in PDF "user space". |
[in] | y | Value of y position in PDF "user space". |
[in] | tolerance | Tolerance value for character hit detection, in point units. This should not be a negative. |
CharInfo ^ Foxit::PDF::TextPage::GetCharInfo | ( | Int32 | charIndex | ) |
Get character information of a specific character.
[in] | charIndex | A zero-based index of character. Range: from 0 to (charcount -1). charcount is returned by function TextPage::CountChars. |
String ^ Foxit::PDF::TextPage::GetChars | ( | CharRange^ | charRange | ) |
Get text content in current text page, within a specified character range.
[in] | charRange | Character range information. CharRange::Start is a zero-based index of character and from 0 to (charcount -1). charcount is returned by function TextPage::CountChars. Set CharRange::Count to -1 to get the whole characters in the page. If CharRange::Count is larger than (charcount - CharRange::Start), all the rest character (from CharRange::Start) will be retrieved. |
String ^ Foxit::PDF::TextPage::GetLink | ( | Int32 | linkIndex | ) |
Get the linked URL associated with a specific hyperlink.
[in] | linkIndex | A zero-based index of the specific hyperlink. Range: from 0 to (linkcount - 1). linkcount is returned by function TextPage::CountLinks. |
TextSelection ^ Foxit::PDF::TextPage::GetLinkSelection | ( | Int32 | linkIndex | ) |
Get a text selection object for a specific hyperlink.
[in] | linkIndex | A zero-based index of the specific hyperlink. Range: from 0 to (linkcount - 1). linkcount is returned by function TextPage::CountLinks. |
Boolean Foxit::PDF::TextPage::Release | ( | ) |
Release all resources.
TextSelection ^ Foxit::PDF::TextPage::SelectByRange | ( | CharRange^ | charRange | ) |
Get a text selection object by a specified character range.
[in] | charRange | Character range information. CharRange::Start is a zero-based index of character and from 0 to (charcount -1). charcount is returned by function TextPage::CountChars. Set CharRange::Count to -1 to get the whole characters in the page. |
TextSelection ^ Foxit::PDF::TextPage::SelectByRectangle | ( | RectF^ | rect | ) |
Get a text selection handle by specific rectangle.
[in] | rect | A Foxit::RectF object that specifies rectangle range for selection. |
TextSearch ^ Foxit::PDF::TextPage::StartSearch | ( | String^ | searchPattern, |
UInt32 | flags, | ||
Int32 | startIndex | ||
) |
Start a PDF text search process.
This function only starts a search process. Then function TextSearch::FindNext or TextSearch::FindPrev should be called to find the first matched pattern.
[in] | searchPattern | A string to be found. |
[in] | flags | Indicate the find options. 0 means no special finding options. And it can be one or combination of the following values: |
[in] | startIndex | A zero-based index specifying the character from which the search starts. -1 means from the end of the page. Range: from -1 to (charcount-1). charcount is returned by function TextPage::CountChars. |