|
Foxit PDF SDK
|
Public Member Functions | |
| TaggedPDF (PDFDoc doc, boolean is_fix) throws com.foxit.sdk.PDFException | |
| Constructor. More... | |
| TaggedPDF (TaggedPDF other) | |
| Constructor, with another tagged PDF object. More... | |
| boolean | canTagDocument () throws com.foxit.sdk.PDFException |
| Check whether the current PDF document can be tagged. More... | |
| boolean | canTagFormFields () throws com.foxit.sdk.PDFException |
| Check whether the form fields in the current PDF document can be auto tagged. More... | |
| synchronized void | delete () |
| Clean up related C++ resources immediately. More... | |
| int | getCurrentFigureElementIndex () throws com.foxit.sdk.PDFException |
| Get current figure element index. More... | |
| String | getFigureAlternateText (int figure_index) throws com.foxit.sdk.PDFException |
| Get the alternate text of the figure. More... | |
| int | getFigureCount () throws com.foxit.sdk.PDFException |
| Get the count of figures in tagged document, excluding the decorative figures. More... | |
| int | getFigurePageIndex (int figure_index) throws com.foxit.sdk.PDFException |
| Get the figure page index by the figure index. More... | |
| RectF | getFigureRect (int figure_index) throws com.foxit.sdk.PDFException |
| Get the rectangle of figure. More... | |
| AlternateTextFigureData | getNextFigureData () throws com.foxit.sdk.PDFException |
| Get next figure data. More... | |
| AlternateTextFigureData | getPrevFigureData () throws com.foxit.sdk.PDFException |
| Get previous figure data. More... | |
| boolean | hasFigures () throws com.foxit.sdk.PDFException |
| Check whether the document has figures. More... | |
| boolean | isAlreadyTagged () throws com.foxit.sdk.PDFException |
| Check whether the current PDF document is already tagged. More... | |
| boolean | isEmpty () |
| Check whether current object is empty or not. More... | |
| void | removeTags () throws com.foxit.sdk.PDFException |
| Remove the accessibility tag tree tree for the current PDF document. More... | |
| boolean | saveFigureData () throws com.foxit.sdk.PDFException |
| Save figure data. More... | |
| boolean | setAsDecorativeFigure (int figure_index) throws com.foxit.sdk.PDFException |
| Decorate the figure.The decorative figure can not set alternate text. More... | |
| void | setCallback (TaggedPDFCallback callback) throws com.foxit.sdk.PDFException |
| void | setCurrentFigureDataInfo (boolean is_decorative, String alternate_text) throws com.foxit.sdk.PDFException |
| Set current figure data info. More... | |
| void | setFigureAlternateText (int figure_index, String alternate_text) throws com.foxit.sdk.PDFException |
| Set figure alternate text. More... | |
| Progressive | startTagDocument (PauseCallback pause, StreamCallback report_callback, AutoTagProviderCallback callback) throws com.foxit.sdk.PDFException |
| Start to auto tag the given PDF document with specified tagged settings. More... | |
| boolean | tagFormFields () throws com.foxit.sdk.PDFException |
| Tag form fields in the current PDF document. 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.
| com.foxit.sdk.addon.accessibility.TaggedPDF.TaggedPDF | ( | PDFDoc | doc, |
| boolean | is_fix | ||
| ) | throws com.foxit.sdk.PDFException |
Constructor.
| [in] | doc | A valid PDF document object to be tagged. |
| [in] | is_fix | Whether this tagged PDF is used for fix operation. If true, figure data methods will use fix alternate text; if false, they will use no-fix alternate text. Default value: false. |
This constructor is to construct a tagged PDF object with specified settings.
| com.foxit.sdk.addon.accessibility.TaggedPDF.TaggedPDF | ( | TaggedPDF | other | ) |
Constructor, with another tagged PDF object.
| [in] | other | Another tagged PDF object. |
| boolean com.foxit.sdk.addon.accessibility.TaggedPDF.canTagDocument | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the current PDF document can be tagged.
| boolean com.foxit.sdk.addon.accessibility.TaggedPDF.canTagFormFields | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the form fields in the current PDF document can be auto tagged.
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.
| synchronized void com.foxit.sdk.addon.accessibility.TaggedPDF.delete | ( | ) |
Clean up related C++ resources immediately.
Reimplemented from com.foxit.sdk.common.Base.
| int com.foxit.sdk.addon.accessibility.TaggedPDF.getCurrentFigureElementIndex | ( | ) | throws com.foxit.sdk.PDFException |
Get current figure element index.
| String com.foxit.sdk.addon.accessibility.TaggedPDF.getFigureAlternateText | ( | int | figure_index | ) | throws com.foxit.sdk.PDFException |
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 com.foxit.sdk.addon.accessibility.TaggedPDF.getFigureCount | ( | ) | throws com.foxit.sdk.PDFException |
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 com.foxit.sdk.addon.accessibility.TaggedPDF.getFigurePageIndex | ( | int | figure_index | ) | throws com.foxit.sdk.PDFException |
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 com.foxit.sdk.addon.accessibility.TaggedPDF.getFigureRect | ( | int | figure_index | ) | throws com.foxit.sdk.PDFException |
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 . |
| AlternateTextFigureData com.foxit.sdk.addon.accessibility.TaggedPDF.getNextFigureData | ( | ) | throws com.foxit.sdk.PDFException |
Get next figure data.
| AlternateTextFigureData com.foxit.sdk.addon.accessibility.TaggedPDF.getPrevFigureData | ( | ) | throws com.foxit.sdk.PDFException |
Get previous figure data.
| boolean com.foxit.sdk.addon.accessibility.TaggedPDF.hasFigures | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the document has figures.
| boolean com.foxit.sdk.addon.accessibility.TaggedPDF.isAlreadyTagged | ( | ) | throws com.foxit.sdk.PDFException |
Check whether the current PDF document is already tagged.
| boolean com.foxit.sdk.addon.accessibility.TaggedPDF.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
| void com.foxit.sdk.addon.accessibility.TaggedPDF.removeTags | ( | ) | throws com.foxit.sdk.PDFException |
Remove the accessibility tag tree tree for the current PDF document.
This method releases the accessibility-side tag tree/cache associated with the document.
| boolean com.foxit.sdk.addon.accessibility.TaggedPDF.saveFigureData | ( | ) | throws com.foxit.sdk.PDFException |
Save figure data.
| boolean com.foxit.sdk.addon.accessibility.TaggedPDF.setAsDecorativeFigure | ( | int | figure_index | ) | throws com.foxit.sdk.PDFException |
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 com.foxit.sdk.addon.accessibility.TaggedPDF.setCallback | ( | TaggedPDFCallback | callback | ) | throws com.foxit.sdk.PDFException |
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 com.foxit.sdk.addon.accessibility.TaggedPDF.setCurrentFigureDataInfo | ( | boolean | is_decorative, |
| String | alternate_text | ||
| ) | throws com.foxit.sdk.PDFException |
Set current figure data info.
| [in] | is_decorative | Whether the figure is decorative. |
| [in] | alternate_text | The alternate text. |
| void com.foxit.sdk.addon.accessibility.TaggedPDF.setFigureAlternateText | ( | int | figure_index, |
| String | alternate_text | ||
| ) | throws com.foxit.sdk.PDFException |
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. |
| Progressive com.foxit.sdk.addon.accessibility.TaggedPDF.startTagDocument | ( | PauseCallback | pause, |
| StreamCallback | report_callback, | ||
| AutoTagProviderCallback | callback | ||
| ) | throws com.foxit.sdk.PDFException |
Start to auto tag the given PDF document with specified tagged settings.
If user wants to get specific tag results during the tagging document process, please pass a valid report_callback and/or callback parameter to this function.
| [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. |
| [in] | report_callback | A com.foxit.sdk.common.fxcrt.StreamCallback object used to receive the generated auto tag report stream. This can be null which means not to output the report. If this is not null, it should be a valid stream callback object implemented by user. Default value: null. |
| [in] | callback | An com.foxit.sdk.addon.accessibility.AutoTagProviderCallback object which is implemented by user. User can provide the localized report text 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 report text. |
| boolean com.foxit.sdk.addon.accessibility.TaggedPDF.tagFormFields | ( | ) | throws com.foxit.sdk.PDFException |
Tag form fields in the current PDF document.
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.