Class to represent text selection. More...
Public Member Functions | |
Boolean | Release () |
Release all resources. More... | |
RectF^ | GetBBox () |
Get bounding box (a rectangular area) of current PDF text selection object. More... | |
String^ | GetChars () |
Extract the whole text from current PDF text selection object. More... | |
int32 | CountPieces () |
Count the number of all rectangular areas of segments in current PDF text selection object. More... | |
RectF^ | GetPieceRect (int32 pieceIndex) |
Get rectangular area of a specified segment, based on the result of function TextSelection::CountPieces. More... | |
int32 | GetPieceRotation (int32 pieceIndex) |
Get rotation of the specific segment, based on the result returned by function TextSelection::CountPieces. More... | |
CharRange^ | GetPieceCharRange (int32 pieceIndex) |
Get the character range of a specified segment. More... | |
Properties | |
int64 | pointer |
Pointer to a handle of PDF text selection object. This pointer is not useful outside this SDK. The application should not access the pointer to the handle of the PDF text selection object directly. | |
Class to represent text selection.
Text selection represents a selected area of text, which is commonly expressed as a sequential text data. Following functions can be called to retrieve a text selection object:
int32 Foxit::PDF::TextSelection::CountPieces | ( | ) |
Count the number of all rectangular areas of segments in current PDF text selection object.
This function, along with function TextSelection::GetPieceRect, can be used to detect the position of a text segment in a PDF page.
It will automatically merge small character boxes into bigger ones if those characters are on the same line and have same font settings.
RectF ^ Foxit::PDF::TextSelection::GetBBox | ( | ) |
Get bounding box (a rectangular area) of current PDF text selection object.
Bounding box is the smallest rectangle to enclose the entire selected chars.
String ^ Foxit::PDF::TextSelection::GetChars | ( | ) |
Extract the whole text from current PDF text selection object.
CharRange ^ Foxit::PDF::TextSelection::GetPieceCharRange | ( | int32 | pieceIndex | ) |
Get the character range of a specified segment.
A character range information contains the index of the start character and the count of characters in the segment.
[in] | pieceIndex | A zero-based index of the segment. Range: from 0 to (segmentcount - 1). segmentcount is returned by function TextSelection::CountPieces. |
RectF ^ Foxit::PDF::TextSelection::GetPieceRect | ( | int32 | pieceIndex | ) |
Get rectangular area of a specified segment, based on the result of function TextSelection::CountPieces.
[in] | pieceIndex | A zero-based index of the segment. Range: from 0 to (segmentcount - 1). segmentcount is returned by function TextSelection::CountPieces. |
int32 Foxit::PDF::TextSelection::GetPieceRotation | ( | int32 | pieceIndex | ) |
Get rotation of the specific segment, based on the result returned by function TextSelection::CountPieces.
Rotation value of text means how many degrees it costs to rotate the text in clockwise from horizontal direction.
[in] | pieceIndex | A zero-based index of the segment. Range: from 0 to (segmentcount - 1). segmentcount is returned by function TextSelection::CountPieces. |
Boolean Foxit::PDF::TextSelection::Release | ( | ) |
Release all resources.