|
Foxit PDF SDK
|
Public Member Functions | |
| TagTreeEditor (PDFDoc pdf_doc) throws com.foxit.sdk.PDFException | |
| Constructor. More... | |
| TagTreeEditor (TagTreeEditor other) | |
| Constructor, with another tag editor object. More... | |
| TagTreeItemArray | addNewTag (String selected_tag_id, String type, String title) throws com.foxit.sdk.PDFException |
| Add a new tag to the tag tree. More... | |
| TagTreeItemArray | addTagForAnnotation (boolean is_tag_annotations, Annot annot, int page_index, String selected_tag_id) throws com.foxit.sdk.PDFException |
| Add tag for annotation. More... | |
| boolean | changeTagToArtifact (java.util.ArrayList< java.lang.String > selected_tag_ids, int artifact_type, int artifact_to_side) throws com.foxit.sdk.PDFException |
| Change tag to artifact. More... | |
| TagTreeItemArray | createTagFromSelectionByContent (java.util.ArrayList< java.lang.String > selected_content_ids, String selected_tag_id) throws com.foxit.sdk.PDFException |
| Create tag from selection by content. More... | |
| TagTreeItemArray | createTagFromSelectionByElement (int page_index, String selected_tag_id) throws com.foxit.sdk.PDFException |
| Create tag from selection by element. More... | |
| TagTreeItemArray | createTagFromSelectionByTag (java.util.ArrayList< java.lang.String > selected_tag_ids, String last_selected_tag_id) throws com.foxit.sdk.PDFException |
| Create tag from selection by tag. More... | |
| TagTreeItemArray | createTagFromSelectionByText (int page_index, RectFArray selected_text_rects, String selected_tag_id) throws com.foxit.sdk.PDFException |
| Create tag from selection by text. More... | |
| synchronized void | delete () |
| Clean up related C++ resources immediately. More... | |
| TagTreeItemArray | deleteEmptyTags (java.util.ArrayList< java.lang.String > selected_tag_ids) throws com.foxit.sdk.PDFException |
| Delete empty tags from the tag tree. More... | |
| TagTreeItemArray | deleteTags (java.util.ArrayList< java.lang.String > selected_tag_ids) throws com.foxit.sdk.PDFException |
| Delete specified tags from the tag tree. More... | |
| java.util.ArrayList< java.lang.String > | findTagFromSelection (java.util.ArrayList< java.lang.String > selected_tag_ids) throws com.foxit.sdk.PDFException |
| Find tag from selection. More... | |
| String | getAllContents (String selected_tag_id) throws com.foxit.sdk.PDFException |
| Get all contents of a specified tag item. More... | |
| java.util.ArrayList< java.lang.String > | getContentTreeItemIDsByTagItemID (String selected_tag_id) throws com.foxit.sdk.PDFException |
| Get content tree item IDs by tag item ID. More... | |
| TagProperty | getTagPropertyByID (String item_id) throws com.foxit.sdk.PDFException |
| Get tag property by tag item ID. More... | |
| TagTreeItemArray | getTagTree () throws com.foxit.sdk.PDFException |
| Get the tag tree of the current PDF document. More... | |
| TagTreeMenuItemDataArray | getTagTreeContextMenuItems (TagTreeMenuInputData input_data) throws com.foxit.sdk.PDFException |
| Get context menu items for tag tree. More... | |
| boolean | isEmpty () |
| Check whether current object is empty or not. More... | |
| TagTreeItemArray | moveTags (java.util.ArrayList< java.lang.String > source_tag_ids, String dest_tag_id, boolean is_moved_as_child) throws com.foxit.sdk.PDFException |
| Move tags in the tag tree. More... | |
| boolean | setDocAsTaggedPDF () throws com.foxit.sdk.PDFException |
| Set the current PDF document as a tagged PDF. More... | |
| boolean | setTagPropertyActualText (String item_id, String actual_text) throws com.foxit.sdk.PDFException |
| Set tag property actual text for a specified tag item. More... | |
| boolean | setTagPropertyAlternateText (String item_id, String alternate_text) throws com.foxit.sdk.PDFException |
| Set tag property alternate text for a specified tag item. More... | |
| boolean | setTagPropertyID (String item_id, String id) throws com.foxit.sdk.PDFException |
| Set tag property ID for a specified tag item. More... | |
| boolean | setTagPropertyLanguage (String item_id, String language) throws com.foxit.sdk.PDFException |
| Set tag property language for a specified tag item. More... | |
| boolean | setTagPropertyTitle (String item_id, String title) throws com.foxit.sdk.PDFException |
| Set tag property title for a specified tag item. More... | |
| boolean | setTagPropertyType (String item_id, String type) throws com.foxit.sdk.PDFException |
| Set tag property type for a specified tag item. More... | |
Static Public Attributes | |
| static final int | e_ArtifactAttachToSideTypeBottom = 4 |
| Artifact attach side: bottom. | |
| static final int | e_ArtifactAttachToSideTypeLeft = 1 |
| Artifact attach side: left. | |
| static final int | e_ArtifactAttachToSideTypeNone = 0 |
| Artifact attach side: none. | |
| static final int | e_ArtifactAttachToSideTypeRight = 3 |
| Artifact attach side: right. | |
| static final int | e_ArtifactAttachToSideTypeTop = 2 |
| Artifact attach side: top. | |
| static final int | e_ArtifactTypeLayout = 2 |
| Artifact type: layout artifact (visual layout elements). | |
| static final int | e_ArtifactTypePage = 0 |
| Artifact type: page-level artifact. | |
| static final int | e_ArtifactTypePagination = 1 |
| Artifact type: pagination-related artifact (e.g., headers/footers). | |
This class lets user edit the tag tree (structure tree) of a PDF document: query and modify tag properties, add / delete / move tags, create tags from selection, change tags to artifacts and mark the document as a tagged PDF. 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.TagTreeEditor.TagTreeEditor | ( | PDFDoc | pdf_doc | ) | throws com.foxit.sdk.PDFException |
Constructor.
| [in] | pdf_doc | A valid PDF document object. |
| com.foxit.sdk.addon.accessibility.TagTreeEditor.TagTreeEditor | ( | TagTreeEditor | other | ) |
Constructor, with another tag editor object.
| [in] | other | Another tag editor object. |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.addNewTag | ( | String | selected_tag_id, |
| String | type, | ||
| String | title | ||
| ) | throws com.foxit.sdk.PDFException |
Add a new tag to the tag tree.
| [in] | selected_tag_id | The selected tag ID as parent. |
| [in] | type | The tag type. |
| [in] | title | The tag title. |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.addTagForAnnotation | ( | boolean | is_tag_annotations, |
| Annot | annot, | ||
| int | page_index, | ||
| String | selected_tag_id | ||
| ) | throws com.foxit.sdk.PDFException |
Add tag for annotation.
| [in] | is_tag_annotations | Whether to tag annotations. |
| [in] | annot | The annotation object. |
| [in] | page_index | The page index. Valid range: from 0 to (count-1), where count is returned by function pdf.PDFDoc.getPageCount . |
| [in] | selected_tag_id | The selected tag ID. |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.changeTagToArtifact | ( | java.util.ArrayList< java.lang.String > | selected_tag_ids, |
| int | artifact_type, | ||
| int | artifact_to_side | ||
| ) | throws com.foxit.sdk.PDFException |
Change tag to artifact.
| [in] | selected_tag_ids | The selected tag IDs. |
| [in] | artifact_type | The artifact type. Please refer to . |
| [in] | artifact_to_side | The artifact attach to side type. Please refer to . |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.createTagFromSelectionByContent | ( | java.util.ArrayList< java.lang.String > | selected_content_ids, |
| String | selected_tag_id | ||
| ) | throws com.foxit.sdk.PDFException |
Create tag from selection by content.
| [in] | selected_content_ids | The selected content IDs. |
| [in] | selected_tag_id | The selected tag ID. |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.createTagFromSelectionByElement | ( | int | page_index, |
| String | selected_tag_id | ||
| ) | throws com.foxit.sdk.PDFException |
Create tag from selection by element.
| [in] | page_index | The page index. Valid range: from 0 to (count-1), where count is returned by function pdf.PDFDoc.getPageCount . |
| [in] | selected_tag_id | The selected tag ID. |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.createTagFromSelectionByTag | ( | java.util.ArrayList< java.lang.String > | selected_tag_ids, |
| String | last_selected_tag_id | ||
| ) | throws com.foxit.sdk.PDFException |
Create tag from selection by tag.
| [in] | selected_tag_ids | The selected tag IDs. |
| [in] | last_selected_tag_id | The last selected tag ID. |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.createTagFromSelectionByText | ( | int | page_index, |
| RectFArray | selected_text_rects, | ||
| String | selected_tag_id | ||
| ) | throws com.foxit.sdk.PDFException |
Create tag from selection by text.
| [in] | page_index | The page index. Valid range: from 0 to (count-1), where count is returned by function pdf.PDFDoc.getPageCount . |
| [in] | selected_text_rects | The selected text rectangles. |
| [in] | selected_tag_id | The selected tag ID. |
| synchronized void com.foxit.sdk.addon.accessibility.TagTreeEditor.delete | ( | ) |
Clean up related C++ resources immediately.
Reimplemented from com.foxit.sdk.common.Base.
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.deleteEmptyTags | ( | java.util.ArrayList< java.lang.String > | selected_tag_ids | ) | throws com.foxit.sdk.PDFException |
Delete empty tags from the tag tree.
| [in] | selected_tag_ids | The array of tag IDs to check for empty tags. |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.deleteTags | ( | java.util.ArrayList< java.lang.String > | selected_tag_ids | ) | throws com.foxit.sdk.PDFException |
Delete specified tags from the tag tree.
| [in] | selected_tag_ids | The array of tag IDs to delete. |
| java.util.ArrayList< java.lang.String > com.foxit.sdk.addon.accessibility.TagTreeEditor.findTagFromSelection | ( | java.util.ArrayList< java.lang.String > | selected_tag_ids | ) | throws com.foxit.sdk.PDFException |
Find tag from selection.
| [in] | selected_tag_ids | The selected tag IDs. |
| String com.foxit.sdk.addon.accessibility.TagTreeEditor.getAllContents | ( | String | selected_tag_id | ) | throws com.foxit.sdk.PDFException |
Get all contents of a specified tag item.
| [in] | selected_tag_id | The selected tag ID. |
| java.util.ArrayList< java.lang.String > com.foxit.sdk.addon.accessibility.TagTreeEditor.getContentTreeItemIDsByTagItemID | ( | String | selected_tag_id | ) | throws com.foxit.sdk.PDFException |
Get content tree item IDs by tag item ID.
| [in] | selected_tag_id | The selected tag ID. |
| TagProperty com.foxit.sdk.addon.accessibility.TagTreeEditor.getTagPropertyByID | ( | String | item_id | ) | throws com.foxit.sdk.PDFException |
Get tag property by tag item ID.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData.getItem_id of items returned by TagTreeEditor.getTagTree . |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.getTagTree | ( | ) | throws com.foxit.sdk.PDFException |
Get the tag tree of the current PDF document.
| TagTreeMenuItemDataArray com.foxit.sdk.addon.accessibility.TagTreeEditor.getTagTreeContextMenuItems | ( | TagTreeMenuInputData | input_data | ) | throws com.foxit.sdk.PDFException |
Get context menu items for tag tree.
| [in] | input_data | The input data for context menu. |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.moveTags | ( | java.util.ArrayList< java.lang.String > | source_tag_ids, |
| String | dest_tag_id, | ||
| boolean | is_moved_as_child | ||
| ) | throws com.foxit.sdk.PDFException |
Move tags in the tag tree.
| [in] | source_tag_ids | The source tag IDs to move. |
| [in] | dest_tag_id | The destination tag ID. |
| [in] | is_moved_as_child | Whether to move as child of destination. |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setDocAsTaggedPDF | ( | ) | throws com.foxit.sdk.PDFException |
Set the current PDF document as a tagged PDF.
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyActualText | ( | String | item_id, |
| String | actual_text | ||
| ) | throws com.foxit.sdk.PDFException |
Set tag property actual text for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData.getItem_id of items returned by TagTreeEditor.getTagTree . |
| [in] | actual_text | The actual text to set. |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyAlternateText | ( | String | item_id, |
| String | alternate_text | ||
| ) | throws com.foxit.sdk.PDFException |
Set tag property alternate text for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData.getItem_id of items returned by TagTreeEditor.getTagTree . |
| [in] | alternate_text | The alternate text to set. |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyID | ( | String | item_id, |
| String | id | ||
| ) | throws com.foxit.sdk.PDFException |
Set tag property ID for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData.getItem_id of items returned by TagTreeEditor.getTagTree . |
| [in] | id | The ID to set. |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyLanguage | ( | String | item_id, |
| String | language | ||
| ) | throws com.foxit.sdk.PDFException |
Set tag property language for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData.getItem_id of items returned by TagTreeEditor.getTagTree . |
| [in] | language | The language to set. |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyTitle | ( | String | item_id, |
| String | title | ||
| ) | throws com.foxit.sdk.PDFException |
Set tag property title for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData.getItem_id of items returned by TagTreeEditor.getTagTree . |
| [in] | title | The tag title to set. |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyType | ( | String | item_id, |
| String | type | ||
| ) | throws com.foxit.sdk.PDFException |
Set tag property type for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData.getItem_id of items returned by TagTreeEditor.getTagTree . |
| [in] | type | The tag type to set. |