|
#include <Highlights.h>
Classes | |
| struct | Highlight |
Public Member Functions | |
| Highlights () | |
| Constructor and destructor. | |
| ~Highlights () | |
| Highlights (const Highlights &hlts) | |
| Highlights & | operator= (const Highlights &hlts) |
| Assignment operator. | |
| void | Load (const UString &file_name) |
| Load the Highlight information from a file. | |
| void | Save (const UString &file_name) |
| Save the current Highlight information in the class to a file. | |
| void | Add (const Highlights &hlts) |
| Add highlights. | |
| void | Clear () |
| Clear the current Highlight information in the class. | |
| void | Begin (PDFDoc &doc) |
| Rewind the internal pointer to the first highlight. | |
| bool | HasNext () const |
| Query if there is any subsequent highlight after the current highlight. | |
| void | Next () |
| Move the current highlight to the next highlight. | |
| int | GetCurrentPageNumber () const |
| Get the page number of the current highlight. | |
| int | GetCurrentQuads (const double *&quads) const |
| Get the corresponding quadrangles of the current highlight. | |
| void | Destroy () |
| Frees the native memory of the object. | |
http://partners.adobe.com/public/developer/en/pdf/HighlightFileFormat.pdf
In a nutshell, the Highlights class maintains a set of highlights. Each highlight contains three pieces of information:
page: the number of the page this Highlight is on; position: the start position (text offset) of this Highlight; length: the length of this Highlight.
Possible use case scenarios for Highlights include:
Note:
For a sample code, please take a look at the TextSearchTest sample project.
| pdftron::PDF::Highlights::Highlights | ( | ) |
Constructor and destructor.
| pdftron::PDF::Highlights::~Highlights | ( | ) |
| pdftron::PDF::Highlights::Highlights | ( | const Highlights & | hlts | ) |
| Highlights& pdftron::PDF::Highlights::operator= | ( | const Highlights & | hlts | ) |
Assignment operator.
| void pdftron::PDF::Highlights::Load | ( | const UString & | file_name | ) |
| void pdftron::PDF::Highlights::Save | ( | const UString & | file_name | ) |
Save the current Highlight information in the class to a file.
| file_name | the name of the file to save to. |
| void pdftron::PDF::Highlights::Add | ( | const Highlights & | hlts | ) |
| void pdftron::PDF::Highlights::Clear | ( | ) |
Clear the current Highlight information in the class.
| void pdftron::PDF::Highlights::Begin | ( | PDFDoc & | doc | ) |
Rewind the internal pointer to the first highlight.
| doc | the PDF document to which the highlights correspond. |
| bool pdftron::PDF::Highlights::HasNext | ( | ) | const |
Query if there is any subsequent highlight after the current highlight.
| void pdftron::PDF::Highlights::Next | ( | ) |
Move the current highlight to the next highlight.
| int pdftron::PDF::Highlights::GetCurrentPageNumber | ( | ) | const |
Get the page number of the current highlight.
| int pdftron::PDF::Highlights::GetCurrentQuads | ( | const double *& | quads | ) | const |
Get the corresponding quadrangles of the current highlight.
| quads | the output pointer to the resulting quadrangles. |
| void pdftron::PDF::Highlights::Destroy | ( | ) |
Frees the native memory of the object.