Foxit PDF SDK
|
Public Member Functions | |
TaggedPDF (const foxit::pdf::PDFDoc &doc) | |
Constructor. More... | |
TaggedPDF (const TaggedPDF &other) | |
Constructor, with another tagged PDF object. More... | |
~TaggedPDF () | |
Destructor. | |
WString | GetFigureAlternateText (int figure_index) |
Get the alternate text of the figure. More... | |
int | GetFigureCount () |
Get the count of figures in tagged document,excluding the decorative figures. More... | |
int | GetFigurePageIndex (int figure_index) |
Get the figure page index by the figure index. More... | |
RectF | GetFigureRect (int figure_index) |
Get the rectangle of figure. More... | |
bool | IsEmpty () const |
Check whether current object is empty or not. More... | |
bool | operator!= (const TaggedPDF &other) const |
Not equal operator. More... | |
TaggedPDF & | operator= (const TaggedPDF &other) |
Assign operator. More... | |
bool | operator== (const TaggedPDF &other) const |
Equal operator. More... | |
bool | SetAsDecorativeFigure (int figure_index) |
Decorate the figure.The decorative figure can not set alternate text. More... | |
void | SetCallback (TaggedPDFCallback *callback) |
Set a callback object for tagged PDF. More... | |
void | SetFigureAlternateText (int figure_index, const wchar_t *alternate_text) |
Set figure alternate text. More... | |
common::Progressive | StartTagDocument (common::PauseCallback *pause=0) |
Start to auto tag the given PDF document with specified tagged settings. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
This class represents settings for a tagged PDF document.The tagged PDF means that only tagging information for PDF structure here. Before using any class or methods in this module, please ensure Foxit PDF SDK has been initialized successfully by function common::Library::Initialize with a key including "Accessibility" module.
foxit::addon::accessibility::TaggedPDF::TaggedPDF | ( | const foxit::pdf::PDFDoc & | doc | ) |
Constructor.
[in] | doc | A valid PDF document object to be tagged. |
This constructor is to construct a tagged PDF object with default settings.
foxit::addon::accessibility::TaggedPDF::TaggedPDF | ( | const TaggedPDF & | other | ) |
Constructor, with another tagged PDF object.
[in] | other | Another tagged PDF object. |
WString foxit::addon::accessibility::TaggedPDF::GetFigureAlternateText | ( | int | figure_index | ) |
Get the alternate text of the figure.
The alternate text is the human-readable text, the PDF documents can be enhanced by providing alternate text for images, formulas, or other items that do not translate naturally into text. The function is only used for a tagged PDF document. Please call function pdf::PDFDoc::IsTaggedPDF to check current PDF document whether is a tagged PDF document.
[in] | figure_index | The index of figure. Valid range: from 0 to (count-1). count is returned by function TaggedPDF::GetFigureCount. |
int foxit::addon::accessibility::TaggedPDF::GetFigureCount | ( | ) |
Get the count of figures in tagged document,excluding the decorative figures.
The function is only used for a tagged PDF document. Please call function pdf::PDFDoc::IsTaggedPDF to check current PDF document whether is a tagged PDF document.
int foxit::addon::accessibility::TaggedPDF::GetFigurePageIndex | ( | int | figure_index | ) |
Get the figure page index by the figure index.
The function is only used for a tagged PDF document. Please call function pdf::PDFDoc::IsTaggedPDF to check current PDF document whether is a tagged PDF document.
[in] | figure_index | The index of figure. Valid range: from 0 to (count-1). count is returned by function TaggedPDF::GetFigureCount. |
RectF foxit::addon::accessibility::TaggedPDF::GetFigureRect | ( | int | figure_index | ) |
Get the rectangle of figure.
The function is only used for a tagged PDF document. Please call function pdf::PDFDoc::IsTaggedPDF to check current PDF document whether is a tagged PDF document.
[in] | figure_index | The index of figure. Valid range: from 0 to (count-1). count is returned by function TaggedPDF::GetFigureCount. |
bool foxit::addon::accessibility::TaggedPDF::IsEmpty | ( | ) | const |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
bool foxit::addon::accessibility::TaggedPDF::operator!= | ( | const TaggedPDF & | other | ) | const |
Not equal operator.
[in] | other | Another tagged PDF object. This function will check if current object is not equal to this one. |
Assign operator.
[in] | other | Another tagged PDF object, whose value would be assigned to current object. |
bool foxit::addon::accessibility::TaggedPDF::operator== | ( | const TaggedPDF & | other | ) | const |
Equal operator.
[in] | other | Another tagged PDF object. This function will check if current object is equal to this one. |
bool foxit::addon::accessibility::TaggedPDF::SetAsDecorativeFigure | ( | int | figure_index | ) |
Decorate the figure.The decorative figure can not set alternate text.
The function is only used for a tagged PDF document. Please call function pdf::PDFDoc::IsTaggedPDF to check current PDF document whether is a tagged PDF document.
[in] | figure_index | The index of figure. Valid range: from 0 to (count-1). count is returned by function TaggedPDF::GetFigureCount. |
void foxit::addon::accessibility::TaggedPDF::SetCallback | ( | TaggedPDFCallback * | callback | ) |
Set a callback object for tagged PDF.
If this function is not called, that means no callback will be used.
[in] | callback | A TaggedPDFCallback object which is implemented by user. User can change some information/data during tagged PDF document by this callback. Please ensure that the callback object keeps valid until the life-cycle of current tagged PDF object ends. If this is NULL, that means to use default information/data. |
void foxit::addon::accessibility::TaggedPDF::SetFigureAlternateText | ( | int | figure_index, |
const wchar_t * | alternate_text | ||
) |
Set figure alternate text.
The alternate text is the human-readable text, the PDF documents can be enhanced by providing alternate text for images, formulas, or other items that do not translate naturally into text. The function is only used for a tagged PDF document. Please call function pdf::PDFDoc::IsTaggedPDF to check current PDF document whether is a tagged PDF document.
[in] | figure_index | The index of figure. Valid range: from 0 to (count-1). count is returned by function TaggedPDF::GetFigureCount. |
[in] | alternate_text | The alternative descriptions text. |
common::Progressive foxit::addon::accessibility::TaggedPDF::StartTagDocument | ( | common::PauseCallback * | pause = 0 | ) |
Start to auto tag the given PDF document with specified tagged settings.
If user wants to get specific tag results when tagging document process, please refer to function TaggedPDF::SetCallback about callback function TaggedPDFCallback::Report.
[in] | pause | Pause object which decides if the auto tagging process needs to be paused. This can be NULL which means not to pause during the tagging process. If this is not NULL, it should be a valid pause object implemented by user. Default value: NULL. |