|
Foxit PDF SDK
|
Public Types | |
| enum | ArtifactAttachToSideType { e_ArtifactAttachToSideTypeNone = 0, e_ArtifactAttachToSideTypeLeft = 1, e_ArtifactAttachToSideTypeTop = 2, e_ArtifactAttachToSideTypeRight = 3, e_ArtifactAttachToSideTypeBottom = 4 } |
| Enumeration for artifact attach-to-side type. More... | |
| enum | ArtifactType { e_ArtifactTypePage = 0, e_ArtifactTypePagination = 1, e_ArtifactTypeLayout = 2 } |
| Enumeration for artifact type. More... | |
Public Member Functions | |
| TagTreeEditor (const foxit::pdf::PDFDoc &pdf_doc) | |
| Constructor. More... | |
| TagTreeEditor (const TagTreeEditor &other) | |
| Constructor, with another tag editor object. More... | |
| ~TagTreeEditor () | |
| Destructor. | |
| TagTreeItemArray | AddNewTag (const char *selected_tag_id, const wchar_t *type, const wchar_t *title) |
| Add a new tag to the tag tree. More... | |
| TagTreeItemArray | AddTagForAnnotation (bool is_tag_annotations, const pdf::annots::Annot &annot, int page_index, const char *selected_tag_id) |
| Add tag for annotation. More... | |
| bool | ChangeTagToArtifact (const StringArray &selected_tag_ids, ArtifactType artifact_type, ArtifactAttachToSideType artifact_to_side) |
| Change tag to artifact. More... | |
| TagTreeItemArray | CreateTagFromSelectionByContent (const foxit::StringArray &selected_content_ids, const char *selected_tag_id) |
| Create tag from selection by content. More... | |
| TagTreeItemArray | CreateTagFromSelectionByElement (int page_index, const char *selected_tag_id) |
| Create tag from selection by element. More... | |
| TagTreeItemArray | CreateTagFromSelectionByTag (const foxit::StringArray &selected_tag_ids, const char *last_selected_tag_id) |
| Create tag from selection by tag. More... | |
| TagTreeItemArray | CreateTagFromSelectionByText (int page_index, const RectFArray &selected_text_rects, const char *selected_tag_id) |
| Create tag from selection by text. More... | |
| TagTreeItemArray | DeleteEmptyTags (const foxit::StringArray &selected_tag_ids) |
| Delete empty tags from the tag tree. More... | |
| TagTreeItemArray | DeleteTags (const foxit::StringArray &selected_tag_ids) |
| Delete specified tags from the tag tree. More... | |
| foxit::StringArray | FindTagFromSelection (const foxit::StringArray &selected_tag_ids) |
| Find tag from selection. More... | |
| WString | GetAllContents (const char *selected_tag_id) |
| Get all contents of a specified tag item. More... | |
| StringArray | GetContentTreeItemIDsByTagItemID (const char *selected_tag_id) |
| Get content tree item IDs by tag item ID. More... | |
| TagProperty | GetTagPropertyByID (const char *item_id) |
| Get tag property by tag item ID. More... | |
| TagTreeItemArray | GetTagTree () |
| Get the tag tree of the current PDF document. More... | |
| TagTreeMenuItemDataArray | GetTagTreeContextMenuItems (const TagTreeMenuInputData &input_data) |
| Get context menu items for tag tree. More... | |
| bool | IsEmpty () const |
| Check whether current object is empty or not. More... | |
| TagTreeItemArray | MoveTags (const foxit::StringArray &source_tag_ids, const char *dest_tag_id, bool is_moved_as_child) |
| Move tags in the tag tree. More... | |
| bool | operator!= (const TagTreeEditor &other) const |
| Not equal operator. More... | |
| TagTreeEditor & | operator= (const TagTreeEditor &other) |
| Assign operator. More... | |
| bool | operator== (const TagTreeEditor &other) const |
| Equal operator. More... | |
| bool | SetDocAsTaggedPDF () |
| Set the current PDF document as a tagged PDF. More... | |
| bool | SetTagPropertyActualText (const char *item_id, const wchar_t *actual_text) |
| Set tag property actual text for a specified tag item. More... | |
| bool | SetTagPropertyAlternateText (const char *item_id, const wchar_t *alternate_text) |
| Set tag property alternate text for a specified tag item. More... | |
| bool | SetTagPropertyID (const char *item_id, const wchar_t *id) |
| Set tag property ID for a specified tag item. More... | |
| bool | SetTagPropertyLanguage (const char *item_id, const wchar_t *language) |
| Set tag property language for a specified tag item. More... | |
| bool | SetTagPropertyTitle (const char *item_id, const wchar_t *title) |
| Set tag property title for a specified tag item. More... | |
| bool | SetTagPropertyType (const char *item_id, const wchar_t *type) |
| Set tag property type for a specified tag item. More... | |
Public Member Functions inherited from foxit::Base | |
| FS_HANDLE | Handle () const |
| Get the handle of current object. More... | |
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.
Enumeration for artifact attach-to-side type.
Values of this enumeration should be used alone.
Enumeration for artifact type.
Values of this enumeration should be used alone.
|
explicit |
Constructor.
| [in] | pdf_doc | A valid PDF document object. |
| foxit::addon::accessibility::TagTreeEditor::TagTreeEditor | ( | const TagTreeEditor & | other | ) |
Constructor, with another tag editor object.
| [in] | other | Another tag editor object. |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::AddNewTag | ( | const char * | selected_tag_id, |
| const wchar_t * | type, | ||
| const wchar_t * | title | ||
| ) |
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 foxit::addon::accessibility::TagTreeEditor::AddTagForAnnotation | ( | bool | is_tag_annotations, |
| const pdf::annots::Annot & | annot, | ||
| int | page_index, | ||
| const char * | selected_tag_id | ||
| ) |
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. |
| bool foxit::addon::accessibility::TagTreeEditor::ChangeTagToArtifact | ( | const StringArray & | selected_tag_ids, |
| ArtifactType | artifact_type, | ||
| ArtifactAttachToSideType | artifact_to_side | ||
| ) |
Change tag to artifact.
| [in] | selected_tag_ids | The selected tag IDs. |
| [in] | artifact_type | The artifact type. Please refer to ArtifactType. |
| [in] | artifact_to_side | The artifact attach to side type. Please refer to ArtifactAttachToSideType. |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::CreateTagFromSelectionByContent | ( | const foxit::StringArray & | selected_content_ids, |
| const char * | selected_tag_id | ||
| ) |
Create tag from selection by content.
| [in] | selected_content_ids | The selected content IDs. |
| [in] | selected_tag_id | The selected tag ID. |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::CreateTagFromSelectionByElement | ( | int | page_index, |
| const char * | selected_tag_id | ||
| ) |
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 foxit::addon::accessibility::TagTreeEditor::CreateTagFromSelectionByTag | ( | const foxit::StringArray & | selected_tag_ids, |
| const char * | last_selected_tag_id | ||
| ) |
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 foxit::addon::accessibility::TagTreeEditor::CreateTagFromSelectionByText | ( | int | page_index, |
| const RectFArray & | selected_text_rects, | ||
| const char * | selected_tag_id | ||
| ) |
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. |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::DeleteEmptyTags | ( | const foxit::StringArray & | selected_tag_ids | ) |
Delete empty tags from the tag tree.
| [in] | selected_tag_ids | The array of tag IDs to check for empty tags. |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::DeleteTags | ( | const foxit::StringArray & | selected_tag_ids | ) |
Delete specified tags from the tag tree.
| [in] | selected_tag_ids | The array of tag IDs to delete. |
| foxit::StringArray foxit::addon::accessibility::TagTreeEditor::FindTagFromSelection | ( | const foxit::StringArray & | selected_tag_ids | ) |
Find tag from selection.
| [in] | selected_tag_ids | The selected tag IDs. |
| WString foxit::addon::accessibility::TagTreeEditor::GetAllContents | ( | const char * | selected_tag_id | ) |
Get all contents of a specified tag item.
| [in] | selected_tag_id | The selected tag ID. |
| StringArray foxit::addon::accessibility::TagTreeEditor::GetContentTreeItemIDsByTagItemID | ( | const char * | selected_tag_id | ) |
Get content tree item IDs by tag item ID.
| [in] | selected_tag_id | The selected tag ID. |
| TagProperty foxit::addon::accessibility::TagTreeEditor::GetTagPropertyByID | ( | const char * | item_id | ) |
Get tag property by tag item ID.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by TagTreeEditor::GetTagTree. |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::GetTagTree | ( | ) |
Get the tag tree of the current PDF document.
| TagTreeMenuItemDataArray foxit::addon::accessibility::TagTreeEditor::GetTagTreeContextMenuItems | ( | const TagTreeMenuInputData & | input_data | ) |
Get context menu items for tag tree.
| [in] | input_data | The input data for context menu. |
| bool foxit::addon::accessibility::TagTreeEditor::IsEmpty | ( | ) | const |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::MoveTags | ( | const foxit::StringArray & | source_tag_ids, |
| const char * | dest_tag_id, | ||
| bool | is_moved_as_child | ||
| ) |
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. |
| bool foxit::addon::accessibility::TagTreeEditor::operator!= | ( | const TagTreeEditor & | other | ) | const |
Not equal operator.
| [in] | other | Another tag editor object. This function will check if current object is not equal to this one. |
| TagTreeEditor& foxit::addon::accessibility::TagTreeEditor::operator= | ( | const TagTreeEditor & | other | ) |
Assign operator.
| [in] | other | Another tag editor object, whose value would be assigned to current object. |
| bool foxit::addon::accessibility::TagTreeEditor::operator== | ( | const TagTreeEditor & | other | ) | const |
Equal operator.
| [in] | other | Another tag editor object. This function will check if current object is equal to this one. |
| bool foxit::addon::accessibility::TagTreeEditor::SetDocAsTaggedPDF | ( | ) |
Set the current PDF document as a tagged PDF.
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyActualText | ( | const char * | item_id, |
| const wchar_t * | actual_text | ||
| ) |
Set tag property actual text for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by TagTreeEditor::GetTagTree. |
| [in] | actual_text | The actual text to set. |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyAlternateText | ( | const char * | item_id, |
| const wchar_t * | alternate_text | ||
| ) |
Set tag property alternate text for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by TagTreeEditor::GetTagTree. |
| [in] | alternate_text | The alternate text to set. |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyID | ( | const char * | item_id, |
| const wchar_t * | id | ||
| ) |
Set tag property ID for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by TagTreeEditor::GetTagTree. |
| [in] | id | The ID to set. |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyLanguage | ( | const char * | item_id, |
| const wchar_t * | language | ||
| ) |
Set tag property language for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by TagTreeEditor::GetTagTree. |
| [in] | language | The language to set. |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyTitle | ( | const char * | item_id, |
| const wchar_t * | title | ||
| ) |
Set tag property title for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by TagTreeEditor::GetTagTree. |
| [in] | title | The tag title to set. |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyType | ( | const char * | item_id, |
| const wchar_t * | type | ||
| ) |
Set tag property type for a specified tag item.
| [in] | item_id | The tag item ID, obtained from TagTreeItemData::item_id of items returned by TagTreeEditor::GetTagTree. |
| [in] | type | The tag type to set. |