#include <TextRange.h>
Public Member Functions | |
TextRange () | |
~TextRange () | |
TextRange (const TextRange &tr) | |
TextRange & | operator= (const TextRange &tr) |
int | GetPageNumber () const |
std::vector< QuadPoint > | GetQuads () const |
int | GetQuads (const double *&quads) const |
UString | GetText () const |
UString | GetTextBefore (int count) const |
UString | GetTextAfter (int count) const |
void | Destroy () |
ptrdiff_t | GetHandleInternal () |
TextRange (TRN_TextRange impl) | |
Static Public Member Functions | |
static TextRange * | CreateInternal (ptrdiff_t impl) |
Public Attributes | |
TRN_TextRange | mp_textrange |
The TextRange class represents a contiguous range of text on a PDF page. It may be the result of a text search, or simply a couple of highlighted or underlined words.
Each text range contains a few pieces of information:
page: the number of the page this piece of text is on; position: the start position (text offset); length: the length.
You are able to retrieve further information about the text range, such as its coordinates, the text itself, as well as characters before and after.
Definition at line 28 of file TextRange.h.
pdftron::PDF::TextRange::TextRange | ( | ) |
Constructor and destructor.
pdftron::PDF::TextRange::~TextRange | ( | ) |
pdftron::PDF::TextRange::TextRange | ( | const TextRange & | tr | ) |
Copy constructor.
|
inline |
Definition at line 104 of file TextRange.h.
|
static |
void pdftron::PDF::TextRange::Destroy | ( | ) |
Frees the native memory of the object.
ptrdiff_t pdftron::PDF::TextRange::GetHandleInternal | ( | ) |
int pdftron::PDF::TextRange::GetPageNumber | ( | ) | const |
Get the page number of the text range.
std::vector<QuadPoint> pdftron::PDF::TextRange::GetQuads | ( | ) | const |
Get the corresponding quadrangles of the text range.
int pdftron::PDF::TextRange::GetQuads | ( | const double *& | quads | ) | const |
UString pdftron::PDF::TextRange::GetText | ( | ) | const |
Get the Unicode string content of the text range.
UString pdftron::PDF::TextRange::GetTextAfter | ( | int | count | ) | const |
Get the Unicode string content immediately after the text range.
count | the number of characters to retrieve before the text range |
UString pdftron::PDF::TextRange::GetTextBefore | ( | int | count | ) | const |
Get the Unicode string content immediately before the text range.
count | the number of characters to retrieve before the text range |
TRN_TextRange pdftron::PDF::TextRange::mp_textrange |
Definition at line 102 of file TextRange.h.