|
Foxit PDF SDK
|
Public 成员函数 | |
| TagTreeEditor (PDFDoc pdf_doc) throws com.foxit.sdk.PDFException | |
| 构造函数。 更多... | |
| TagTreeEditor (TagTreeEditor other) | |
| 构造函数,使用另一个标签编辑器对象构造。 更多... | |
| TagTreeItemArray | addNewTag (String selected_tag_id, String type, String title) throws com.foxit.sdk.PDFException |
| 向标签树添加一个新标签。 更多... | |
| TagTreeItemArray | addTagForAnnotation (boolean is_tag_annotations, Annot annot, int page_index, String selected_tag_id) throws com.foxit.sdk.PDFException |
| 为注释添加标签。 更多... | |
| boolean | changeTagToArtifact (java.util.ArrayList< java.lang.String > selected_tag_ids, int artifact_type, int artifact_to_side) throws com.foxit.sdk.PDFException |
| 将标签更改为人工元素。 更多... | |
| TagTreeItemArray | createTagFromSelectionByContent (java.util.ArrayList< java.lang.String > selected_content_ids, String selected_tag_id) throws com.foxit.sdk.PDFException |
| 根据内容从选中内容创建标签。 更多... | |
| TagTreeItemArray | createTagFromSelectionByElement (int page_index, String selected_tag_id) throws com.foxit.sdk.PDFException |
| 根据元素从选中内容创建标签。 更多... | |
| TagTreeItemArray | createTagFromSelectionByTag (java.util.ArrayList< java.lang.String > selected_tag_ids, String last_selected_tag_id) throws com.foxit.sdk.PDFException |
| 根据标签从选中内容创建标签。 更多... | |
| TagTreeItemArray | createTagFromSelectionByText (int page_index, RectFArray selected_text_rects, String selected_tag_id) throws com.foxit.sdk.PDFException |
| 根据文本从选中内容创建标签。 更多... | |
| synchronized void | delete () |
| 直接清除C++相关资源。 更多... | |
| TagTreeItemArray | deleteEmptyTags (java.util.ArrayList< java.lang.String > selected_tag_ids) throws com.foxit.sdk.PDFException |
| 从标签树中删除空标签。 更多... | |
| TagTreeItemArray | deleteTags (java.util.ArrayList< java.lang.String > selected_tag_ids) throws com.foxit.sdk.PDFException |
| 从标签树中删除指定的标签。 更多... | |
| java.util.ArrayList< java.lang.String > | findTagFromSelection (java.util.ArrayList< java.lang.String > selected_tag_ids) throws com.foxit.sdk.PDFException |
| 根据选中内容查找标签。 更多... | |
| String | getAllContents (String selected_tag_id) throws com.foxit.sdk.PDFException |
| 获取指定标签项的所有内容。 更多... | |
| java.util.ArrayList< java.lang.String > | getContentTreeItemIDsByTagItemID (String selected_tag_id) throws com.foxit.sdk.PDFException |
| 根据标签项 ID 获取内容树项 ID。 更多... | |
| TagProperty | getTagPropertyByID (String item_id) throws com.foxit.sdk.PDFException |
| 根据标签项 ID 获取标签属性。 更多... | |
| TagTreeItemArray | getTagTree () throws com.foxit.sdk.PDFException |
| 获取当前 PDF 文档的标签树。 更多... | |
| TagTreeMenuItemDataArray | getTagTreeContextMenuItems (TagTreeMenuInputData input_data) throws com.foxit.sdk.PDFException |
| 获取标签树的右键菜单项。 更多... | |
| boolean | isEmpty () |
| 检查当前对象是否为空。 更多... | |
| 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 |
| 在标签树中移动标签。 更多... | |
| boolean | setDocAsTaggedPDF () throws com.foxit.sdk.PDFException |
| 将当前 PDF 文档设置为已标记 PDF。 更多... | |
| boolean | setTagPropertyActualText (String item_id, String actual_text) throws com.foxit.sdk.PDFException |
| 为指定标签项设置标签属性的实际文本。 更多... | |
| boolean | setTagPropertyAlternateText (String item_id, String alternate_text) throws com.foxit.sdk.PDFException |
| 为指定标签项设置标签属性的替代文本。 更多... | |
| boolean | setTagPropertyID (String item_id, String id) throws com.foxit.sdk.PDFException |
| 为指定标签项设置标签属性的 ID。 更多... | |
| boolean | setTagPropertyLanguage (String item_id, String language) throws com.foxit.sdk.PDFException |
| 为指定标签项设置标签属性的语言。 更多... | |
| boolean | setTagPropertyTitle (String item_id, String title) throws com.foxit.sdk.PDFException |
| 为指定标签项设置标签属性的标题。 更多... | |
| boolean | setTagPropertyType (String item_id, String type) throws com.foxit.sdk.PDFException |
| 为指定标签项设置标签属性的类型。 更多... | |
静态 Public 属性 | |
| static final int | e_ArtifactAttachToSideTypeBottom = 4 |
| 人工元素附着边:底部。 | |
| static final int | e_ArtifactAttachToSideTypeLeft = 1 |
| 人工元素附着边:左侧。 | |
| static final int | e_ArtifactAttachToSideTypeNone = 0 |
| 人工元素附着边:无。 | |
| static final int | e_ArtifactAttachToSideTypeRight = 3 |
| 人工元素附着边:右侧。 | |
| static final int | e_ArtifactAttachToSideTypeTop = 2 |
| 人工元素附着边:顶部。 | |
| static final int | e_ArtifactTypeLayout = 2 |
| 人工元素类型:版式人工元素(视觉版式元素)。 | |
| static final int | e_ArtifactTypePage = 0 |
| 人工元素类型:页面级人工元素。 | |
| static final int | e_ArtifactTypePagination = 1 |
| 人工元素类型:与分页相关的人工元素(如页眉/页脚)。 | |
此类用于让用户编辑 PDF 文档的标签树(结构树):查询和修改标签 属性、添加/删除/移动标签、根据选中内容创建标签、将标签更改为人工元素以及 将文档标记为已标记 PDF。 在使用此模块中的任何类或方法之前,请确保已通过 common.Library.initialize 函数并使用包含 "Accessibility" 模块的密钥成功初始化福昕 PDF SDK。
| com.foxit.sdk.addon.accessibility.TagTreeEditor.TagTreeEditor | ( | PDFDoc | pdf_doc | ) | throws com.foxit.sdk.PDFException |
构造函数。
| [in] | pdf_doc | 有效的 PDF 文档对象。 |
| com.foxit.sdk.addon.accessibility.TagTreeEditor.TagTreeEditor | ( | TagTreeEditor | other | ) |
构造函数,使用另一个标签编辑器对象构造。
| [in] | other | 另一个标签编辑器对象。 |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.addNewTag | ( | String | selected_tag_id, |
| String | type, | ||
| String | title | ||
| ) | throws com.foxit.sdk.PDFException |
向标签树添加一个新标签。
| [in] | selected_tag_id | 作为父级的已选中标签 ID。 |
| [in] | type | 标签类型。 |
| [in] | 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 |
为注释添加标签。
| [in] | is_tag_annotations | 是否为注释添加标签。 |
| [in] | annot | 注释对象。 |
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf.PDFDoc.getPageCount 返回的页面总数。 |
| [in] | selected_tag_id | 已选中的标签 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 |
将标签更改为人工元素。
| [in] | selected_tag_ids | 已选中的标签 ID 集合。 |
| [in] | artifact_type | 人工元素类型。请参考 。 |
| [in] | artifact_to_side | 人工元素附着边类型。 请参考 。 |
| 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 |
根据内容从选中内容创建标签。
| [in] | selected_content_ids | 已选中的内容 ID 集合。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.createTagFromSelectionByElement | ( | int | page_index, |
| String | selected_tag_id | ||
| ) | throws com.foxit.sdk.PDFException |
根据元素从选中内容创建标签。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf.PDFDoc.getPageCount 返回的页面总数。 |
| [in] | selected_tag_id | 已选中的标签 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 |
根据标签从选中内容创建标签。
| [in] | selected_tag_ids | 已选中的标签 ID 集合。 |
| [in] | last_selected_tag_id | 最后一个被选中的标签 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 |
根据文本从选中内容创建标签。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf.PDFDoc.getPageCount 返回的页面总数。 |
| [in] | selected_text_rects | 已选中文本的矩形集合。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| synchronized void com.foxit.sdk.addon.accessibility.TagTreeEditor.delete | ( | ) |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.deleteEmptyTags | ( | java.util.ArrayList< java.lang.String > | selected_tag_ids | ) | throws com.foxit.sdk.PDFException |
从标签树中删除空标签。
| [in] | selected_tag_ids | 用于检查空标签的标签 ID 数组。 |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.deleteTags | ( | java.util.ArrayList< java.lang.String > | selected_tag_ids | ) | throws com.foxit.sdk.PDFException |
从标签树中删除指定的标签。
| [in] | selected_tag_ids | 待删除标签 ID 的数组。 |
| 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 |
根据选中内容查找标签。
| [in] | selected_tag_ids | 已选中的标签 ID 集合。 |
| String com.foxit.sdk.addon.accessibility.TagTreeEditor.getAllContents | ( | String | selected_tag_id | ) | throws com.foxit.sdk.PDFException |
获取指定标签项的所有内容。
| [in] | selected_tag_id | 已选中的标签 ID。 |
| java.util.ArrayList< java.lang.String > com.foxit.sdk.addon.accessibility.TagTreeEditor.getContentTreeItemIDsByTagItemID | ( | String | selected_tag_id | ) | throws com.foxit.sdk.PDFException |
根据标签项 ID 获取内容树项 ID。
| [in] | selected_tag_id | 已选中的标签 ID。 |
| TagProperty com.foxit.sdk.addon.accessibility.TagTreeEditor.getTagPropertyByID | ( | String | item_id | ) | throws com.foxit.sdk.PDFException |
根据标签项 ID 获取标签属性。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor.getTagTree 返回的条目中的 TagTreeItemData.getItem_id 获取。 |
| TagTreeItemArray com.foxit.sdk.addon.accessibility.TagTreeEditor.getTagTree | ( | ) | throws com.foxit.sdk.PDFException |
获取当前 PDF 文档的标签树。
| TagTreeMenuItemDataArray com.foxit.sdk.addon.accessibility.TagTreeEditor.getTagTreeContextMenuItems | ( | TagTreeMenuInputData | input_data | ) | throws com.foxit.sdk.PDFException |
获取标签树的右键菜单项。
| [in] | input_data | 右键菜单的输入数据。 |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.isEmpty | ( | ) |
检查当前对象是否为空。
当前对象为空时,表示当前对象不可用。
| 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 |
在标签树中移动标签。
| [in] | dest_tag_id | 目标标签 ID。 |
| [in] | is_moved_as_child | 是否作为目标的子项移动。 |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setDocAsTaggedPDF | ( | ) | throws com.foxit.sdk.PDFException |
将当前 PDF 文档设置为已标记 PDF。
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyActualText | ( | String | item_id, |
| String | actual_text | ||
| ) | throws com.foxit.sdk.PDFException |
为指定标签项设置标签属性的实际文本。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor.getTagTree 返回的条目中的 TagTreeItemData.getItem_id 获取。 |
| [in] | actual_text | 要设置的实际文本。 |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyAlternateText | ( | String | item_id, |
| String | alternate_text | ||
| ) | throws com.foxit.sdk.PDFException |
为指定标签项设置标签属性的替代文本。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor.getTagTree 返回的条目中的 TagTreeItemData.getItem_id 获取。 |
| [in] | alternate_text | 要设置的替代文本。 |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyID | ( | String | item_id, |
| String | id | ||
| ) | throws com.foxit.sdk.PDFException |
为指定标签项设置标签属性的 ID。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor.getTagTree 返回的条目中的 TagTreeItemData.getItem_id 获取。 |
| [in] | id | 要设置的 ID。 |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyLanguage | ( | String | item_id, |
| String | language | ||
| ) | throws com.foxit.sdk.PDFException |
为指定标签项设置标签属性的语言。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor.getTagTree 返回的条目中的 TagTreeItemData.getItem_id 获取。 |
| [in] | language | 要设置的语言。 |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyTitle | ( | String | item_id, |
| String | title | ||
| ) | throws com.foxit.sdk.PDFException |
为指定标签项设置标签属性的标题。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor.getTagTree 返回的条目中的 TagTreeItemData.getItem_id 获取。 |
| [in] | title | 要设置的标签标题。 |
| boolean com.foxit.sdk.addon.accessibility.TagTreeEditor.setTagPropertyType | ( | String | item_id, |
| String | type | ||
| ) | throws com.foxit.sdk.PDFException |
为指定标签项设置标签属性的类型。
| [in] | item_id | 标签项 ID,通过 TagTreeEditor.getTagTree 返回的条目中的 TagTreeItemData.getItem_id 获取。 |
| [in] | type | 要设置的标签类型。 |