|
Foxit PDF SDK
|
Public 类型 | |
| enum | ArtifactAttachToSideType { e_ArtifactAttachToSideTypeNone = 0, e_ArtifactAttachToSideTypeLeft = 1, e_ArtifactAttachToSideTypeTop = 2, e_ArtifactAttachToSideTypeRight = 3, e_ArtifactAttachToSideTypeBottom = 4 } |
| 人工元素附着边类型枚举。 更多... | |
| enum | ArtifactType { e_ArtifactTypePage = 0, e_ArtifactTypePagination = 1, e_ArtifactTypeLayout = 2 } |
| 人工元素(Artifact)类型枚举。 更多... | |
Public 成员函数 | |
| TagTreeEditor (const foxit::pdf::PDFDoc &pdf_doc) | |
| 构造函数。 更多... | |
| TagTreeEditor (const TagTreeEditor &other) | |
| 构造函数,使用另一个标签编辑器对象构造。 更多... | |
| ~TagTreeEditor () | |
| 析构函数。 | |
| TagTreeItemArray | AddNewTag (const char *selected_tag_id, const wchar_t *type, const wchar_t *title) |
| 向标签树添加一个新标签。 更多... | |
| TagTreeItemArray | AddTagForAnnotation (bool is_tag_annotations, const pdf::annots::Annot &annot, int page_index, const char *selected_tag_id) |
| 为注释添加标签。 更多... | |
| bool | ChangeTagToArtifact (const StringArray &selected_tag_ids, ArtifactType artifact_type, ArtifactAttachToSideType artifact_to_side) |
| 将标签更改为人工元素。 更多... | |
| TagTreeItemArray | CreateTagFromSelectionByContent (const foxit::StringArray &selected_content_ids, const char *selected_tag_id) |
| 根据内容从选中内容创建标签。 更多... | |
| TagTreeItemArray | CreateTagFromSelectionByElement (int page_index, const char *selected_tag_id) |
| 根据元素从选中内容创建标签。 更多... | |
| TagTreeItemArray | CreateTagFromSelectionByTag (const foxit::StringArray &selected_tag_ids, const char *last_selected_tag_id) |
| 根据标签从选中内容创建标签。 更多... | |
| TagTreeItemArray | CreateTagFromSelectionByText (int page_index, const RectFArray &selected_text_rects, const char *selected_tag_id) |
| 根据文本从选中内容创建标签。 更多... | |
| TagTreeItemArray | DeleteEmptyTags (const foxit::StringArray &selected_tag_ids) |
| 从标签树中删除空标签。 更多... | |
| TagTreeItemArray | DeleteTags (const foxit::StringArray &selected_tag_ids) |
| 从标签树中删除指定的标签。 更多... | |
| foxit::StringArray | FindTagFromSelection (const foxit::StringArray &selected_tag_ids) |
| 根据选中内容查找标签。 更多... | |
| WString | GetAllContents (const char *selected_tag_id) |
| 获取指定标签项的所有内容。 更多... | |
| StringArray | GetContentTreeItemIDsByTagItemID (const char *selected_tag_id) |
| 根据标签项 ID 获取内容树项 ID。 更多... | |
| TagProperty | GetTagPropertyByID (const char *item_id) |
| 根据标签项 ID 获取标签属性。 更多... | |
| TagTreeItemArray | GetTagTree () |
| 获取当前 PDF 文档的标签树。 更多... | |
| TagTreeMenuItemDataArray | GetTagTreeContextMenuItems (const TagTreeMenuInputData &input_data) |
| 获取标签树的右键菜单项。 更多... | |
| bool | IsEmpty () const |
| 检查当前对象是否为空。 更多... | |
| TagTreeItemArray | MoveTags (const foxit::StringArray &source_tag_ids, const char *dest_tag_id, bool is_moved_as_child) |
| 在标签树中移动标签。 更多... | |
| bool | operator!= (const TagTreeEditor &other) const |
| 不等于操作符。 更多... | |
| TagTreeEditor & | operator= (const TagTreeEditor &other) |
| 赋值操作符。 更多... | |
| bool | operator== (const TagTreeEditor &other) const |
| 等于操作符。 更多... | |
| bool | SetDocAsTaggedPDF () |
| 将当前 PDF 文档设置为已标记 PDF。 更多... | |
| bool | SetTagPropertyActualText (const char *item_id, const wchar_t *actual_text) |
| 为指定标签项设置标签属性的实际文本。 更多... | |
| bool | SetTagPropertyAlternateText (const char *item_id, const wchar_t *alternate_text) |
| 为指定标签项设置标签属性的替代文本。 更多... | |
| bool | SetTagPropertyID (const char *item_id, const wchar_t *id) |
| 为指定标签项设置标签属性的 ID。 更多... | |
| bool | SetTagPropertyLanguage (const char *item_id, const wchar_t *language) |
| 为指定标签项设置标签属性的语言。 更多... | |
| bool | SetTagPropertyTitle (const char *item_id, const wchar_t *title) |
| 为指定标签项设置标签属性的标题。 更多... | |
| bool | SetTagPropertyType (const char *item_id, const wchar_t *type) |
| 为指定标签项设置标签属性的类型。 更多... | |
Public 成员函数 继承自 foxit::Base | |
| FS_HANDLE | Handle () const |
| 获取当前对象的句柄。 更多... | |
此类用于让用户编辑 PDF 文档的标签树(结构树):查询和修改标签 属性、添加/删除/移动标签、根据选中内容创建标签、将标签更改为人工元素以及 将文档标记为已标记 PDF。 在使用此模块中的任何类或方法之前,请确保已通过 common::Library::Initialize 函数并使用包含 "Accessibility" 模块的密钥成功初始化福昕 PDF SDK。
|
explicit |
构造函数。
| [in] | pdf_doc | 有效的 PDF 文档对象。 |
| foxit::addon::accessibility::TagTreeEditor::TagTreeEditor | ( | const TagTreeEditor & | other | ) |
构造函数,使用另一个标签编辑器对象构造。
| [in] | other | 另一个标签编辑器对象。 |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::AddNewTag | ( | const char * | selected_tag_id, |
| const wchar_t * | type, | ||
| const wchar_t * | title | ||
| ) |
向标签树添加一个新标签。
| [in] | selected_tag_id | 作为父级的已选中标签 ID。 |
| [in] | type | 标签类型。 |
| [in] | title | 标签标题。 |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::AddTagForAnnotation | ( | bool | is_tag_annotations, |
| const pdf::annots::Annot & | annot, | ||
| int | page_index, | ||
| const char * | selected_tag_id | ||
| ) |
为注释添加标签。
| [in] | is_tag_annotations | 是否为注释添加标签。 |
| [in] | annot | 注释对象。 |
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| bool foxit::addon::accessibility::TagTreeEditor::ChangeTagToArtifact | ( | const StringArray & | selected_tag_ids, |
| ArtifactType | artifact_type, | ||
| ArtifactAttachToSideType | artifact_to_side | ||
| ) |
将标签更改为人工元素。
| [in] | selected_tag_ids | 已选中的标签 ID 集合。 |
| [in] | artifact_type | 人工元素类型。请参考 ArtifactType。 |
| [in] | artifact_to_side | 人工元素附着边类型。 请参考 ArtifactAttachToSideType。 |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::CreateTagFromSelectionByContent | ( | const foxit::StringArray & | selected_content_ids, |
| const char * | selected_tag_id | ||
| ) |
根据内容从选中内容创建标签。
| [in] | selected_content_ids | 已选中的内容 ID 集合。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::CreateTagFromSelectionByElement | ( | int | page_index, |
| const char * | selected_tag_id | ||
| ) |
根据元素从选中内容创建标签。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::CreateTagFromSelectionByTag | ( | const foxit::StringArray & | selected_tag_ids, |
| const char * | last_selected_tag_id | ||
| ) |
根据标签从选中内容创建标签。
| [in] | selected_tag_ids | 已选中的标签 ID 集合。 |
| [in] | last_selected_tag_id | 最后一个被选中的标签 ID。 |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::CreateTagFromSelectionByText | ( | int | page_index, |
| const RectFArray & | selected_text_rects, | ||
| const char * | selected_tag_id | ||
| ) |
根据文本从选中内容创建标签。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| [in] | selected_text_rects | 已选中文本的矩形集合。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::DeleteEmptyTags | ( | const foxit::StringArray & | selected_tag_ids | ) |
从标签树中删除空标签。
| [in] | selected_tag_ids | 用于检查空标签的标签 ID 数组。 |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::DeleteTags | ( | const foxit::StringArray & | selected_tag_ids | ) |
从标签树中删除指定的标签。
| [in] | selected_tag_ids | 待删除标签 ID 的数组。 |
| foxit::StringArray foxit::addon::accessibility::TagTreeEditor::FindTagFromSelection | ( | const foxit::StringArray & | selected_tag_ids | ) |
根据选中内容查找标签。
| [in] | selected_tag_ids | 已选中的标签 ID 集合。 |
| WString foxit::addon::accessibility::TagTreeEditor::GetAllContents | ( | const char * | selected_tag_id | ) |
获取指定标签项的所有内容。
| [in] | selected_tag_id | 已选中的标签 ID。 |
| StringArray foxit::addon::accessibility::TagTreeEditor::GetContentTreeItemIDsByTagItemID | ( | const char * | selected_tag_id | ) |
根据标签项 ID 获取内容树项 ID。
| [in] | selected_tag_id | 已选中的标签 ID。 |
| TagProperty foxit::addon::accessibility::TagTreeEditor::GetTagPropertyByID | ( | const char * | item_id | ) |
根据标签项 ID 获取标签属性。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor::GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::GetTagTree | ( | ) |
获取当前 PDF 文档的标签树。
| TagTreeMenuItemDataArray foxit::addon::accessibility::TagTreeEditor::GetTagTreeContextMenuItems | ( | const TagTreeMenuInputData & | input_data | ) |
获取标签树的右键菜单项。
| [in] | input_data | 右键菜单的输入数据。 |
| bool foxit::addon::accessibility::TagTreeEditor::IsEmpty | ( | ) | const |
检查当前对象是否为空。
当前对象为空时,表示当前对象不可用。
| TagTreeItemArray foxit::addon::accessibility::TagTreeEditor::MoveTags | ( | const foxit::StringArray & | source_tag_ids, |
| const char * | dest_tag_id, | ||
| bool | is_moved_as_child | ||
| ) |
在标签树中移动标签。
| [in] | src_tag_ids | 要移动的源标签 ID 集合。 |
| [in] | dest_tag_id | 目标标签 ID。 |
| [in] | is_moved_as_child | 是否作为目标的子项移动。 |
| bool foxit::addon::accessibility::TagTreeEditor::operator!= | ( | const TagTreeEditor & | other | ) | const |
不等于操作符。
| [in] | other | 另一个标签编辑器对象。此函数将检查当前对象是否与该对象不相等。 |
| TagTreeEditor& foxit::addon::accessibility::TagTreeEditor::operator= | ( | const TagTreeEditor & | other | ) |
赋值操作符。
| [in] | other | 另一个标签编辑器对象,其值将被赋值给当前对象。 |
| bool foxit::addon::accessibility::TagTreeEditor::operator== | ( | const TagTreeEditor & | other | ) | const |
等于操作符。
| [in] | other | 另一个标签编辑器对象。此函数将检查当前对象是否与该对象相等。 |
| bool foxit::addon::accessibility::TagTreeEditor::SetDocAsTaggedPDF | ( | ) |
将当前 PDF 文档设置为已标记 PDF。
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyActualText | ( | const char * | item_id, |
| const wchar_t * | actual_text | ||
| ) |
为指定标签项设置标签属性的实际文本。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor::GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | actual_text | 要设置的实际文本。 |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyAlternateText | ( | const char * | item_id, |
| const wchar_t * | alternate_text | ||
| ) |
为指定标签项设置标签属性的替代文本。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor::GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | alternate_text | 要设置的替代文本。 |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyID | ( | const char * | item_id, |
| const wchar_t * | id | ||
| ) |
为指定标签项设置标签属性的 ID。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor::GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | id | 要设置的 ID。 |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyLanguage | ( | const char * | item_id, |
| const wchar_t * | language | ||
| ) |
为指定标签项设置标签属性的语言。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor::GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | language | 要设置的语言。 |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyTitle | ( | const char * | item_id, |
| const wchar_t * | title | ||
| ) |
为指定标签项设置标签属性的标题。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor::GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | title | 要设置的标签标题。 |
| bool foxit::addon::accessibility::TagTreeEditor::SetTagPropertyType | ( | const char * | item_id, |
| const wchar_t * | type | ||
| ) |
为指定标签项设置标签属性的类型。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor::GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | type | 要设置的标签类型。 |