Foxit PDF SDK
fs_taggedpdf.h
1 
16 #ifndef FS_TAGGEDPDF_H_
17 #define FS_TAGGEDPDF_H_
18 
19 #include "common/fs_common.h"
20 #include "pdf/fs_pdfdoc.h"
21 #include "pdf/fs_pdfpage.h"
23 
29 namespace foxit {
33 namespace addon {
37 namespace accessibility {
44  public:
50  typedef enum _AutoTagResultDataType {
136 
162 
163  protected:
165 };
166 
173  public:
179  typedef enum _ReportCategory {
198  } ReportCategory;
199 
205  typedef enum _ReportConfidence {
217 
218 
224  virtual void Release() = 0;
225 
238  virtual void Report(ReportCategory category, ReportConfidence confidence, int page_index, const RectF& rect) = 0;
239 
240  protected:
241  ~TaggedPDFCallback() {}
242 };
243 
259 class AlternateTextFigureData FS_FINAL : public Object {
260  public:
265  : is_decorative_figure(false)
266  , page_index(-1) { }
267 
277  this->is_decorative_figure = is_decorative_figure;
278  this->alternate_text = alternate_text;
279  this->alternate_text_changed = alternate_text_changed;
280  this->page_index = page_index;
281  this->rect = rect;
282  }
283 
289  this->alternate_text = other.alternate_text;
291  this->page_index = other.page_index;
292  this->rect = other.rect;
293  }
294 
301  this->alternate_text = other.alternate_text;
303  this->page_index = other.page_index;
304  this->rect = other.rect;
305  return (*this);
306  }
307 
316  void Set(bool is_decorative_figure, const wchar_t* alternate_text, const wchar_t* alternate_text_changed,
318  this->is_decorative_figure = is_decorative_figure;
319  this->alternate_text = alternate_text;
320  this->alternate_text_changed = alternate_text_changed;
321  this->page_index = page_index;
322  this->rect = rect;
323  }
324 
335 };
336 
345 class TaggedPDF FS_FINAL : public Base {
346  public:
357  TaggedPDF(const foxit::pdf::PDFDoc& doc, bool is_fix=false);
358 
359  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
360  explicit TaggedPDF(FS_HANDLE handle);
361 
363  ~TaggedPDF();
364 
370  TaggedPDF(const TaggedPDF& other);
371 
379  TaggedPDF& operator=(const TaggedPDF& other);
380 
388  bool operator==(const TaggedPDF& other) const;
389 
397  bool operator!=(const TaggedPDF& other) const;
398 
406  bool IsEmpty() const;
407 
424  void SetCallback(TaggedPDFCallback* callback);
425 
431  bool CanTagDocument();
432 
455 
461  bool IsAlreadyTagged();
462 
468  void RemoveTags();
469 
477  bool CanTagFormFields();
478 
486  bool TagFormFields();
487 
495  int GetFigureCount();
496 
506  bool SetAsDecorativeFigure(int figure_index);
507 
521  void SetFigureAlternateText(int figure_index, const wchar_t* alternate_text);
522 
532  WString GetFigureAlternateText(int figure_index);
533 
543  RectF GetFigureRect(int figure_index);
544 
554  int GetFigurePageIndex(int figure_index);
555 
561  bool HasFigures();
562 
569 
576 
583 
592  void SetCurrentFigureDataInfo(bool is_decorative, const wchar_t* alternate_text);
593 
599  bool SaveFigureData();
600 };
601 
605 class TagTreeItemData FS_FINAL : public Object {
606  public:
612  typedef enum _TagImageType {
631  } TagImageType;
632 
638  typedef enum _TagNodeType {
645  } TagNodeType;
646 
649  : page_index(-1)
652 
664  TagTreeItemData(const wchar_t* item_name, const char* item_id, const char* item_pos,
669  , item_id(item_id)
670  , item_pos(item_pos)
675 
683  this->item_name = other.item_name;
684  this->item_id = other.item_id;
685  this->item_pos = other.item_pos;
686  this->item_rects = other.item_rects;
687  this->page_index = other.page_index;
688  this->item_image_type = other.item_image_type;
689  this->item_node_type = other.item_node_type;
690  }
691 
701  this->item_name = other.item_name;
702  this->item_id = other.item_id;
703  this->item_pos = other.item_pos;
704  this->item_rects = other.item_rects;
705  this->page_index = other.page_index;
706  this->item_image_type = other.item_image_type;
707  this->item_node_type = other.item_node_type;
708  return *this;
709  }
710 
724  void Set(const wchar_t* item_name, const char* item_id, const char* item_pos,
728  this->item_name = item_name;
729  this->item_id = item_id;
730  this->item_pos = item_pos;
731  this->item_rects = item_rects;
732  this->page_index = page_index;
733  this->item_image_type = item_image_type;
734  this->item_node_type = item_node_type;
735  }
736 
755 };
756 
759 
760 
763 class AccessibilityTagTreeItem FS_FINAL : public Object {
764  public:
767 
775  const TagTreeItemDataArray& children_items_data)
776  : item_data(item_data)
777  , children_items_data(children_items_data) {}
778 
785  this->item_data = other.item_data;
786  this->children_items_data = other.children_items_data;
787  }
788 
797  this->item_data = other.item_data;
798  this->children_items_data = other.children_items_data;
799  return (*this);
800  }
801 
810  void Set(const TagTreeItemData& item_data,
811  const TagTreeItemDataArray& children_items_data) {
812  this->item_data = item_data;
813  this->children_items_data = children_items_data;
814  }
815 
820 };
821 
824 
825 
828 class TagProperty FS_FINAL : public Object {
829  public:
832 
843  TagProperty(const wchar_t* tag_type, const wchar_t* tag_title, const wchar_t* tag_actual_text,
844  const wchar_t* tag_alternate_text, const wchar_t* tag_id, const wchar_t* tag_language)
845  : tag_type(tag_type)
846  , tag_title(tag_title)
847  , tag_actual_text(tag_actual_text)
848  , tag_alternate_text(tag_alternate_text)
849  , tag_id(tag_id)
850  , tag_language(tag_language) {}
851 
857  TagProperty(const TagProperty& other) {
858  this->tag_type = other.tag_type;
859  this->tag_title = other.tag_title;
860  this->tag_actual_text = other.tag_actual_text;
861  this->tag_alternate_text = other.tag_alternate_text;
862  this->tag_id = other.tag_id;
863  this->tag_language = other.tag_language;
864  }
865 
874  this->tag_type = other.tag_type;
875  this->tag_title = other.tag_title;
876  this->tag_actual_text = other.tag_actual_text;
877  this->tag_alternate_text = other.tag_alternate_text;
878  this->tag_id = other.tag_id;
879  this->tag_language = other.tag_language;
880  return (*this);
881  }
882 
895  void Set(const wchar_t* tag_type, const wchar_t* tag_title, const wchar_t* tag_actual_text,
896  const wchar_t* tag_alternate_text, const wchar_t* tag_id, const wchar_t* tag_language) {
897  this->tag_type = tag_type;
898  this->tag_title = tag_title;
899  this->tag_actual_text = tag_actual_text;
900  this->tag_alternate_text = tag_alternate_text;
901  this->tag_id = tag_id;
902  this->tag_language = tag_language;
903  }
904 
917 };
918 
922 class TagTreeMenuItemData FS_FINAL : public Object {
923  public:
926  : is_enable(false)
927  , is_check_item(false)
928  , is_checked(false) {}
929 
942  , is_checked(is_checked) {}
943 
950  item_name = other.item_name;
951  is_enable = other.is_enable;
953  is_checked = other.is_checked;
954  }
955 
964  item_name = other.item_name;
965  is_enable = other.is_enable;
967  is_checked = other.is_checked;
968  return *this;
969  }
970 
981  void Set(const wchar_t* item_name, bool is_enable, bool is_check_item, bool is_checked) {
982  this->item_name = item_name;
983  this->is_enable = is_enable;
984  this->is_check_item = is_check_item;
985  this->is_checked = is_checked;
986  }
987 
991  bool is_enable;
996 };
997 
1000 
1001 
1004 class TagTreeMenuInputData FS_FINAL : public Object {
1005  public:
1008  : is_reflow_mode(false)
1009  , is_have_selected_obj(false)
1010  , is_selected_from_tag_finder(false)
1011  , is_role_map_17(false)
1012  , is_highlight_content(false) {}
1013 
1025  TagTreeMenuInputData(bool is_reflow_mode, bool is_have_selected_obj, bool is_selected_from_tag_finder,
1026  bool is_role_map_17, bool is_highlight_content,
1027  const foxit::StringArray& cut_tag_ids,
1028  const foxit::StringArray& selected_tag_ids)
1029  : is_reflow_mode(is_reflow_mode)
1030  , is_have_selected_obj(is_have_selected_obj)
1031  , is_selected_from_tag_finder(is_selected_from_tag_finder)
1032  , is_role_map_17(is_role_map_17)
1033  , is_highlight_content(is_highlight_content)
1034  , cut_tag_ids(cut_tag_ids)
1035  , selected_tag_ids(selected_tag_ids) {}
1036 
1043  is_reflow_mode = other.is_reflow_mode;
1044  is_have_selected_obj = other.is_have_selected_obj;
1045  is_selected_from_tag_finder = other.is_selected_from_tag_finder;
1046  is_role_map_17 = other.is_role_map_17;
1047  is_highlight_content = other.is_highlight_content;
1048  cut_tag_ids = other.cut_tag_ids;
1049  selected_tag_ids = other.selected_tag_ids;
1050  }
1051 
1060  is_reflow_mode = other.is_reflow_mode;
1061  is_have_selected_obj = other.is_have_selected_obj;
1062  is_selected_from_tag_finder = other.is_selected_from_tag_finder;
1063  is_role_map_17 = other.is_role_map_17;
1064  is_highlight_content = other.is_highlight_content;
1065  cut_tag_ids = other.cut_tag_ids;
1066  selected_tag_ids = other.selected_tag_ids;
1067  return *this;
1068  }
1069 
1083  void Set(bool is_reflow_mode, bool is_have_selected_obj, bool is_selected_from_tag_finder,
1084  bool is_role_map_17, bool is_highlight_content,
1085  const foxit::StringArray& cut_tag_ids,
1086  const foxit::StringArray& selected_tag_ids) {
1087  this->is_reflow_mode = is_reflow_mode;
1088  this->is_have_selected_obj = is_have_selected_obj;
1089  this->is_selected_from_tag_finder = is_selected_from_tag_finder;
1090  this->is_role_map_17 = is_role_map_17;
1091  this->is_highlight_content = is_highlight_content;
1092  this->cut_tag_ids = cut_tag_ids;
1093  this->selected_tag_ids = selected_tag_ids;
1094  }
1095 
1110 };
1111 
1121 class TagTreeEditor FS_FINAL : public Base {
1122  public:
1128  typedef enum _ArtifactType {
1135  } ArtifactType;
1136 
1142  typedef enum _ArtifactAttachToSideType {
1154 
1155 
1161  explicit TagTreeEditor(const foxit::pdf::PDFDoc& pdf_doc);
1162 
1163  explicit TagTreeEditor(FS_HANDLE handle);
1164 
1166  ~TagTreeEditor();
1167 
1173  TagTreeEditor(const TagTreeEditor& other);
1174 
1182  TagTreeEditor& operator=(const TagTreeEditor& other);
1183 
1191  bool operator==(const TagTreeEditor& other) const;
1192 
1200  bool operator!=(const TagTreeEditor& other) const;
1201 
1209  bool IsEmpty() const;
1210 
1217 
1229  TagProperty GetTagPropertyByID(const char* item_id);
1230 
1243  bool SetTagPropertyType(const char* item_id, const wchar_t* type);
1244 
1257  bool SetTagPropertyTitle(const char* item_id, const wchar_t* title);
1258 
1271  bool SetTagPropertyActualText(const char* item_id, const wchar_t* actual_text);
1272 
1285  bool SetTagPropertyAlternateText(const char* item_id, const wchar_t* alternate_text);
1286 
1299  bool SetTagPropertyID(const char* item_id, const wchar_t* id);
1300 
1313  bool SetTagPropertyLanguage(const char* item_id, const wchar_t* language);
1314 
1323 
1333  TagTreeItemArray AddNewTag(const char* selected_tag_id, const wchar_t* type, const wchar_t* title);
1334 
1342  TagTreeItemArray DeleteTags(const foxit::StringArray& selected_tag_ids);
1343 
1351  TagTreeItemArray DeleteEmptyTags(const foxit::StringArray& selected_tag_ids);
1352 
1362  TagTreeItemArray MoveTags(const foxit::StringArray& source_tag_ids, const char* dest_tag_id,
1363  bool is_moved_as_child);
1364 
1373 
1382  TagTreeItemArray CreateTagFromSelectionByElement(int page_index, const char* selected_tag_id);
1383 
1393  TagTreeItemArray CreateTagFromSelectionByText(int page_index, const RectFArray& selected_text_rects,
1394  const char* selected_tag_id);
1395 
1405  const char* selected_tag_id);
1406 
1416  const char* last_selected_tag_id);
1417 
1425  WString GetAllContents(const char* selected_tag_id);
1426 
1437  bool ChangeTagToArtifact(const StringArray& selected_tag_ids, ArtifactType artifact_type,
1438  ArtifactAttachToSideType artifact_to_side);
1439 
1445  bool SetDocAsTaggedPDF();
1446 
1457  TagTreeItemArray AddTagForAnnotation(bool is_tag_annotations, const pdf::annots::Annot& annot,
1458  int page_index, const char* selected_tag_id);
1459 
1467  StringArray GetContentTreeItemIDsByTagItemID(const char* selected_tag_id);
1468 };
1469 
1470 }
1471 }
1472 }
1473 #endif
自动标记结果数据类型:提示图形。
Definition: fs_taggedpdf.h:100
RectF GetFigureRect(int figure_index)
获取图像的矩形区域。
virtual foxit::WString GetReportText(AutoTagResultDataType type)=0
获取指定自动标记结果数据类型的显示文本。
void SetFigureAlternateText(int figure_index, const wchar_t *alternate_text)
设置图像的替代文本。
标签图像类型:标签节点。
Definition: fs_taggedpdf.h:630
TagTreeItemArray GetTagTree()
获取当前 PDF 文档的标签树。
自动标记结果数据类型:图像替代文本汇总。
Definition: fs_taggedpdf.h:126
人工元素类型:页面级人工元素。
Definition: fs_taggedpdf.h:1130
自动标记结果数据类型:标记报告简介。
Definition: fs_taggedpdf.h:128
表示用于对 PDF 文档进行标记的回调对象。
Definition: fs_taggedpdf.h:172
TagTreeMenuInputData & operator=(const TagTreeMenuInputData &other)
赋值操作符。
Definition: fs_taggedpdf.h:1059
TagTreeItemData(const TagTreeItemData &other)
构造函数,使用另一个可访问性标签树项数据对象构造。
Definition: fs_taggedpdf.h:682
AccessibilityTagTreeItem(const AccessibilityTagTreeItem &other)
构造函数,使用另一个可访问性标签树项对象构造。
Definition: fs_taggedpdf.h:784
WString tag_title
标签标题。
Definition: fs_taggedpdf.h:908
StringArray GetContentTreeItemIDsByTagItemID(const char *selected_tag_id)
根据标签项 ID 获取内容树项 ID。
bool IsEmpty() const
检查当前对象是否为空。
TagTreeEditor & operator=(const TagTreeEditor &other)
赋值操作符。
AlternateTextFigureData()
默认构造函数:创建一个空的、非装饰性图像条目。
Definition: fs_taggedpdf.h:264
自动标记结果数据类型:表格集合。
Definition: fs_taggedpdf.h:70
bool is_enable
该菜单项是否已启用。
Definition: fs_taggedpdf.h:991
表示用于可访问性自动标记结果的提供者回调对象。
Definition: fs_taggedpdf.h:43
表示已标记 PDF 文档的设置。本模块仅涉及 PDF 结构的标记信息。
Definition: fs_taggedpdf.h:345
TagTreeItemData & operator=(const TagTreeItemData &other)
赋值操作符。
Definition: fs_taggedpdf.h:700
bool ChangeTagToArtifact(const StringArray &selected_tag_ids, ArtifactType artifact_type, ArtifactAttachToSideType artifact_to_side)
将标签更改为人工元素。
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:220
virtual void Release()=0
用于释放当前回调对象自身的回调函数。
自动标记结果数据类型:检查器表格5。
Definition: fs_taggedpdf.h:118
标签图像类型:表格。
Definition: fs_taggedpdf.h:622
自动标记结果数据类型:表格行。
Definition: fs_taggedpdf.h:72
bool SetTagPropertyLanguage(const char *item_id, const wchar_t *language)
为指定标签项设置标签属性的语言。
PDF文档相关定义和类的头文件。
人工元素附着边:无。
Definition: fs_taggedpdf.h:1144
foxit::StringArray FindTagFromSelection(const foxit::StringArray &selected_tag_ids)
根据选中内容查找标签。
AutoTagResultDataType
自动标记(accessibility auto tag)结果数据类型的枚举。
Definition: fs_taggedpdf.h:50
自动标记结果数据类型:低置信度。
Definition: fs_taggedpdf.h:86
人工元素附着边:右侧。
Definition: fs_taggedpdf.h:1150
标签节点类型:元素。
Definition: fs_taggedpdf.h:640
自动标记结果数据类型:引言/介绍。
Definition: fs_taggedpdf.h:120
void Set(const wchar_t *item_name, bool is_enable, bool is_check_item, bool is_checked)
设置值。
Definition: fs_taggedpdf.h:981
标签图像类型:标签节。
Definition: fs_taggedpdf.h:620
bool SetAsDecorativeFigure(int figure_index)
将指定索引的图像设为装饰性图像。装饰性图像不能设置替代文本。
AlternateTextFigureData(bool is_decorative_figure, const wchar_t *alternate_text, const wchar_t *alternate_text_changed, int page_index, foxit::RectF rect)
使用显式值构造。
Definition: fs_taggedpdf.h:276
bool is_highlight_content
是否高亮显示内容。
Definition: fs_taggedpdf.h:1105
人工元素类型:版式人工元素(视觉版式元素)。
Definition: fs_taggedpdf.h:1134
自动标记结果数据类型:表格表头。
Definition: fs_taggedpdf.h:74
人工元素附着边:底部。
Definition: fs_taggedpdf.h:1152
自动标记结果数据类型:降低置信度汇总。
Definition: fs_taggedpdf.h:122
TagTreeMenuItemData(const TagTreeMenuItemData &other)
构造函数,使用另一个可访问性菜单项数据对象构造。
Definition: fs_taggedpdf.h:949
AlternateTextFigureData(const AlternateTextFigureData &other)
拷贝构造函数。
Definition: fs_taggedpdf.h:287
int GetFigureCount()
获取标记文档中(不包括装饰性图像)的图像计数。
标签图像类型:标签段落。
Definition: fs_taggedpdf.h:618
TagTreeMenuItemData(const wchar_t *item_name, bool is_enable, bool is_check_item, bool is_checked)
构造函数,使用参数构造。
Definition: fs_taggedpdf.h:938
人工元素附着边:左侧。
Definition: fs_taggedpdf.h:1146
AlternateTextFigureData GetNextFigureData()
获取下一个图像数据。
TagTreeMenuInputData(bool is_reflow_mode, bool is_have_selected_obj, bool is_selected_from_tag_finder, bool is_role_map_17, bool is_highlight_content, const foxit::StringArray &cut_tag_ids, const foxit::StringArray &selected_tag_ids)
构造函数,使用参数构造。
Definition: fs_taggedpdf.h:1025
宽字符串类
Definition: fx_string.h:1457
标签节点类型:标记内容序列。
Definition: fs_taggedpdf.h:642
bool CanTagFormFields()
检查当前 PDF 文档中的表单字段是否可以被自动标记。
bool TagFormFields()
对当前 PDF 文档的表单字段进行标记。
void Set(bool is_reflow_mode, bool is_have_selected_obj, bool is_selected_from_tag_finder, bool is_role_map_17, bool is_highlight_content, const foxit::StringArray &cut_tag_ids, const foxit::StringArray &selected_tag_ids)
设置值。
Definition: fs_taggedpdf.h:1083
自动标记结果数据类型:修复类别。
Definition: fs_taggedpdf.h:90
TagTreeMenuInputData()
构造函数。
Definition: fs_taggedpdf.h:1007
bool is_have_selected_obj
是否存在已选中的对象。
Definition: fs_taggedpdf.h:1099
图像替代文本信息的数据结构。
Definition: fs_taggedpdf.h:259
int page_index
此标签树项所在的页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。
Definition: fs_taggedpdf.h:746
TagTreeItemArray DeleteTags(const foxit::StringArray &selected_tag_ids)
从标签树中删除指定的标签。
Definition: fs_pdfdoc.h:768
TagProperty & operator=(const TagProperty &other)
赋值操作符。
Definition: fs_taggedpdf.h:873
自动标记结果数据类型:检查类别。
Definition: fs_taggedpdf.h:88
bool SaveFigureData()
保存图像数据。
bool HasFigures()
检查文档是否包含图像。
WString alternate_text_changed
更改后的替代文本(修复模式下修改)。
Definition: fs_taggedpdf.h:330
自动标记结果数据类型:中高置信度。
Definition: fs_taggedpdf.h:80
AlternateTextFigureData GetPrevFigureData()
获取上一个图像数据。
AccessibilityTagTreeItem & operator=(const AccessibilityTagTreeItem &other)
赋值操作符。
Definition: fs_taggedpdf.h:796
bool is_decorative_figure
是否为装饰性图像(无替代文本)。
Definition: fs_taggedpdf.h:326
自动标记结果数据类型:段落集合。
Definition: fs_taggedpdf.h:64
报告置信度:中等。
Definition: fs_taggedpdf.h:211
报告置信度:中等偏低。
Definition: fs_taggedpdf.h:213
TagTreeItemArray CreateTagFromSelectionByContent(const foxit::StringArray &selected_content_ids, const char *selected_tag_id)
根据内容从选中内容创建标签。
int GetCurrentFigureElementIndex()
获取当前图像元素的索引。
ArtifactType
人工元素(Artifact)类型枚举。
Definition: fs_taggedpdf.h:1128
报告类别:段落。
Definition: fs_taggedpdf.h:185
TagTreeMenuItemData & operator=(const TagTreeMenuItemData &other)
赋值操作符。
Definition: fs_taggedpdf.h:963
TagTreeItemArray MoveTags(const foxit::StringArray &source_tag_ids, const char *dest_tag_id, bool is_moved_as_child)
在标签树中移动标签。
自动标记结果数据类型:图形集合。
Definition: fs_taggedpdf.h:68
Definition: fs_taggedpdf.h:605
TaggedPDF & operator=(const TaggedPDF &other)
赋值操作。
报告类别:区域。
Definition: fs_taggedpdf.h:181
TaggedPDF(const foxit::pdf::PDFDoc &doc, bool is_fix=false)
构造函数。
TagTreeItemData()
构造函数。
Definition: fs_taggedpdf.h:648
WString item_name
标签树项的显示名称。
Definition: fs_taggedpdf.h:738
TagTreeMenuItemData()
构造函数。
Definition: fs_taggedpdf.h:925
TagProperty GetTagPropertyByID(const char *item_id)
根据标签项 ID 获取标签属性。
标签图像类型:PDF。
Definition: fs_taggedpdf.h:614
标签图像类型:表格行。
Definition: fs_taggedpdf.h:628
bool operator!=(const TagTreeEditor &other) const
不等于操作符。
自动标记结果数据类型:中低置信度。
Definition: fs_taggedpdf.h:84
common::Progressive StartTagDocument(common::PauseCallback *pause, foxit::common::file::StreamCallback *report_callback=0, AutoTagProviderCallback *callback=0)
开始对给定 PDF 文档执行自动标记,使用当前的标记设置。
报告类别:目录项(TOC 项)。
Definition: fs_taggedpdf.h:197
Definition: fs_taggedpdf.h:828
WString GetFigureAlternateText(int figure_index)
获取图像的替代文本。
自动标记结果数据类型:功能区(Ribbon)类别。
Definition: fs_taggedpdf.h:124
TagImageType item_image_type
用于表示此标签树项的图像类型。 请参考从 TagTreeItemData::e_TagImageTypePDF 开始的值。
Definition: fs_taggedpdf.h:750
RectFArray item_rects
与此标签树项关联的矩形集合。
Definition: fs_taggedpdf.h:744
virtual void Report(ReportCategory category, ReportConfidence confidence, int page_index, const RectF &rect)=0
在文档将被标记时触发的回调函数,用于获取标记 PDF 文档的结果信息。
TagImageType
标签图像类型枚举。
Definition: fs_taggedpdf.h:612
自动标记结果数据类型:目录(TOC)。
Definition: fs_taggedpdf.h:76
文件流接口,用于读取和写入。
Definition: fx_stream.h:692
AccessibilityTagTreeItem()
构造函数。
Definition: fs_taggedpdf.h:766
void SetCurrentFigureDataInfo(bool is_decorative, const wchar_t *alternate_text)
设置当前图像数据的信息。
标签图像类型:页面对象。
Definition: fs_taggedpdf.h:616
WString tag_language
标签语言。
Definition: fs_taggedpdf.h:916
TagTreeItemArray CreateTagFromSelectionByTag(const foxit::StringArray &selected_tag_ids, const char *last_selected_tag_id)
根据标签从选中内容创建标签。
自动标记结果数据类型:替代文本提示。
Definition: fs_taggedpdf.h:116
TagTreeItemArray CreateTagFromSelectionByText(int page_index, const RectFArray &selected_text_rects, const char *selected_tag_id)
根据文本从选中内容创建标签。
Definition: fx_basic.h:3737
自动标记结果数据类型:页面。
Definition: fs_taggedpdf.h:58
报告类别:人工元素(Artifact)。
Definition: fs_taggedpdf.h:183
TagProperty(const wchar_t *tag_type, const wchar_t *tag_title, const wchar_t *tag_actual_text, const wchar_t *tag_alternate_text, const wchar_t *tag_id, const wchar_t *tag_language)
构造函数,使用参数构造。
Definition: fs_taggedpdf.h:843
TagTreeItemData(const wchar_t *item_name, const char *item_id, const char *item_pos, RectFArray item_rects, int page_index, TagImageType item_image_type, TagNodeType item_node_type)
构造函数,使用参数构造。
Definition: fs_taggedpdf.h:664
自动标记结果数据类型:中等置信度。
Definition: fs_taggedpdf.h:82
WString tag_actual_text
标签实际文本。
Definition: fs_taggedpdf.h:910
自动标记结果数据类型:人工元素集合(Artifacts)。
Definition: fs_taggedpdf.h:62
foxit::StringArray selected_tag_ids
已选中的标签 ID 集合。
Definition: fs_taggedpdf.h:1109
bool CanTagDocument()
检查当前 PDF 文档是否可以被标记。
Definition: fs_common.h:377
自动标记结果数据类型:区域集合。
Definition: fs_taggedpdf.h:60
Definition: fs_taggedpdf.h:823
TagNodeType item_node_type
此标签树项的节点类型。 请参考从 TagTreeItemData::e_TagNodeTypeElement 开始的值。
Definition: fs_taggedpdf.h:754
bool IsEmpty() const
检查当前对象是否为空。
自动标记结果数据类型:标记报告文件名。
Definition: fs_taggedpdf.h:132
TagTreeEditor(const foxit::pdf::PDFDoc &pdf_doc)
构造函数。
自动标记结果数据类型:提示修复。
Definition: fs_taggedpdf.h:110
bool SetTagPropertyActualText(const char *item_id, const wchar_t *actual_text)
为指定标签项设置标签属性的实际文本。
Definition: fs_taggedpdf.h:1121
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
标签节点类型:对象。
Definition: fs_taggedpdf.h:644
自动标记结果数据类型:标记报告下一页。
Definition: fs_taggedpdf.h:56
TagTreeMenuItemDataArray GetTagTreeContextMenuItems(const TagTreeMenuInputData &input_data)
获取标签树的右键菜单项。
自动标记结果数据类型:标记报告上一页。
Definition: fs_taggedpdf.h:54
通用定义和类的头文件。
String item_pos
标签树项的位置描述符。
Definition: fs_taggedpdf.h:742
bool is_checked
该菜单项是否已被选中。
Definition: fs_taggedpdf.h:995
bool SetTagPropertyTitle(const char *item_id, const wchar_t *title)
为指定标签项设置标签属性的标题。
TagProperty(const TagProperty &other)
构造函数,使用另一个可访问性标签属性对象构造。
Definition: fs_taggedpdf.h:857
bool SetTagPropertyAlternateText(const char *item_id, const wchar_t *alternate_text)
为指定标签项设置标签属性的替代文本。
自动标记结果数据类型:返回顶部。
Definition: fs_taggedpdf.h:134
bool is_check_item
该菜单项是否为复选项。
Definition: fs_taggedpdf.h:993
报告类别:列表项。
Definition: fs_taggedpdf.h:187
void Set(const wchar_t *tag_type, const wchar_t *tag_title, const wchar_t *tag_actual_text, const wchar_t *tag_alternate_text, const wchar_t *tag_id, const wchar_t *tag_language)
设置值。
Definition: fs_taggedpdf.h:895
报告置信度:低。
Definition: fs_taggedpdf.h:215
foxit::StringArray cut_tag_ids
被剪切的标签 ID 集合。
Definition: fs_taggedpdf.h:1107
ReportConfidence
用于标记 PDF 文档的报告置信度枚举。
Definition: fs_taggedpdf.h:205
TagProperty()
构造函数。
Definition: fs_taggedpdf.h:831
WString alternate_text
更改前的替代文本(原始)。
Definition: fs_taggedpdf.h:328
Definition: fs_basictypes.h:471
Definition: fs_basictypes.h:229
标签图像类型:表格数据单元格。
Definition: fs_taggedpdf.h:624
bool IsAlreadyTagged()
检查当前 PDF 文档是否已被标记。
标签图像类型:表格表头单元格。
Definition: fs_taggedpdf.h:626
bool is_reflow_mode
是否处于重排模式。
Definition: fs_taggedpdf.h:1097
自动标记结果数据类型:提示人工元素。
Definition: fs_taggedpdf.h:94
自动标记结果数据类型:替代文本(alttext)。
Definition: fs_taggedpdf.h:114
自动标记结果数据类型:提示区域。
Definition: fs_taggedpdf.h:92
bool operator==(const TaggedPDF &other) const
相等比较运算符。
bool SetTagPropertyType(const char *item_id, const wchar_t *type)
为指定标签项设置标签属性的类型。
int page_index
图像所在的零基页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。
Definition: fs_taggedpdf.h:332
PDF页面相关定义和类的头文件。
AlternateTextFigureData & operator=(const AlternateTextFigureData &other)
赋值操作符。
Definition: fs_taggedpdf.h:299
人工元素附着边:顶部。
Definition: fs_taggedpdf.h:1148
bool is_selected_from_tag_finder
是否通过标签查找器进行选择。
Definition: fs_taggedpdf.h:1101
foxit::RectF rect
图像在页面上的边界矩形。
Definition: fs_taggedpdf.h:334
Definition: fs_annot.h:950
自动标记结果数据类型:提示表格表头。
Definition: fs_taggedpdf.h:106
自动标记结果数据类型:微调阅读顺序。
Definition: fs_taggedpdf.h:112
WString tag_type
标签类型。
Definition: fs_taggedpdf.h:906
报告置信度:中等偏高。
Definition: fs_taggedpdf.h:209
bool operator==(const TagTreeEditor &other) const
等于操作符。
void Set(const TagTreeItemData &item_data, const TagTreeItemDataArray &children_items_data)
设置值。
Definition: fs_taggedpdf.h:810
Foxit 命名空间。
Definition: fs_accessibility.h:28
报告类别:表格行。
Definition: fs_taggedpdf.h:193
自动标记结果数据类型:提示表格行。
Definition: fs_taggedpdf.h:104
报告类别:表格。
Definition: fs_taggedpdf.h:191
TagTreeItemArray CreateTagFromSelectionByElement(int page_index, const char *selected_tag_id)
根据元素从选中内容创建标签。
WString tag_id
标签 ID。
Definition: fs_taggedpdf.h:914
字节字符串类
Definition: fx_string.h:317
bool SetDocAsTaggedPDF()
将当前 PDF 文档设置为已标记 PDF。
TagTreeMenuInputData(const TagTreeMenuInputData &other)
构造函数,使用另一个可访问性标签树菜单输入数据对象构造。
Definition: fs_taggedpdf.h:1042
自动标记结果数据类型:提示目录(TOC)。
Definition: fs_taggedpdf.h:108
自动标记结果数据类型:提示表格。
Definition: fs_taggedpdf.h:102
自动标记结果数据类型:提示列表。
Definition: fs_taggedpdf.h:98
自动标记结果数据类型:提示段落。
Definition: fs_taggedpdf.h:96
TagTreeItemData item_data
项的信息。
Definition: fs_taggedpdf.h:817
bool is_role_map_17
角色映射是否为 PDF 1.7。
Definition: fs_taggedpdf.h:1103
void RemoveTags()
从当前 PDF 文档中移除标签。
WString GetAllContents(const char *selected_tag_id)
获取指定标签项的所有内容。
报告类别:表格表头。
Definition: fs_taggedpdf.h:195
#define NULL
空指针值。
Definition: fx_system.h:792
报告类别:图形(Figure)。
Definition: fs_taggedpdf.h:189
String item_id
标签树项的唯一标识符。
Definition: fs_taggedpdf.h:740
报告置信度:高。
Definition: fs_taggedpdf.h:207
int GetFigurePageIndex(int figure_index)
根据图像索引获取图像所在的页面索引。
WString item_name
项名称。
Definition: fs_taggedpdf.h:989
TagTreeItemArray AddNewTag(const char *selected_tag_id, const wchar_t *type, const wchar_t *title)
向标签树添加一个新标签。
自动标记结果数据类型:高置信度。
Definition: fs_taggedpdf.h:78
自动标记结果数据类型:缺失图像。
Definition: fs_taggedpdf.h:130
人工元素类型:与分页相关的人工元素(如页眉/页脚)。
Definition: fs_taggedpdf.h:1132
ArtifactAttachToSideType
人工元素附着边类型枚举。
Definition: fs_taggedpdf.h:1142
自动标记结果数据类型:列表项。
Definition: fs_taggedpdf.h:66
Header file for Accessibility related definitions and classes.
TagNodeType
标签节点类型枚举。
Definition: fs_taggedpdf.h:638
bool SetTagPropertyID(const char *item_id, const wchar_t *id)
为指定标签项设置标签属性的 ID。
void SetCallback(TaggedPDFCallback *callback)
为 TaggedPDF 设置回调对象。
void Set(const wchar_t *item_name, const char *item_id, const char *item_pos, RectFArray item_rects, int page_index, TagImageType item_image_type, TagNodeType item_node_type)
设置值。
Definition: fs_taggedpdf.h:724
TagTreeItemArray AddTagForAnnotation(bool is_tag_annotations, const pdf::annots::Annot &annot, int page_index, const char *selected_tag_id)
为注释添加标签。
TagTreeItemDataArray children_items_data
子项的信息。
Definition: fs_taggedpdf.h:819
ReportCategory
用于标记 PDF 的报告类别类型的枚举。
Definition: fs_taggedpdf.h:179
AccessibilityTagTreeItem(const TagTreeItemData &item_data, const TagTreeItemDataArray &children_items_data)
构造函数,使用参数构造。
Definition: fs_taggedpdf.h:774
WString tag_alternate_text
标签替代文本。
Definition: fs_taggedpdf.h:912
void Set(bool is_decorative_figure, const wchar_t *alternate_text, const wchar_t *alternate_text_changed, int page_index, foxit::RectF rect)
一次性设置对象的所有值。
Definition: fs_taggedpdf.h:316
Definition: fx_coordinates.h:771
TagTreeItemArray DeleteEmptyTags(const foxit::StringArray &selected_tag_ids)
从标签树中删除空标签。
自动标记结果数据类型:降低置信度。
Definition: fs_taggedpdf.h:52
bool operator!=(const TaggedPDF &other) const
不等比较运算符。