Foxit PDF SDK
fs_taggedpdf.h
浏览该文件的文档.
1 
15 #ifndef FS_TAGGEDPDF_H_
16 #define FS_TAGGEDPDF_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfdoc.h"
20 #include "pdf/fs_pdfpage.h"
21 
27 namespace foxit {
31 namespace addon {
35 namespace accessibility {
42  public:
48  typedef enum _ReportCategory {
68 
74  typedef enum _ReportConfidence {
86 
87 
93  virtual void Release() = 0;
94 
111  virtual void Report(ReportCategory category, ReportConfidence confidence, int page_index, const RectF& rect) = 0;
112 
113  protected:
114  ~TaggedPDFCallback() {}
115 };
116 
125 class TaggedPDF FS_FINAL : public Base {
126  public:
134  TaggedPDF(const foxit::pdf::PDFDoc& doc);
135 
136  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
137  explicit TaggedPDF(FS_HANDLE handle);
138 
140  ~TaggedPDF();
141 
147  TaggedPDF(const TaggedPDF& other);
148 
156  TaggedPDF& operator=(const TaggedPDF& other);
157 
165  bool operator==(const TaggedPDF& other) const;
166 
174  bool operator!=(const TaggedPDF& other) const;
175 
183  bool IsEmpty() const;
184 
197  void SetCallback(TaggedPDFCallback* callback);
198 
216 
226  int GetFigureCount();
227 
240  bool SetAsDecorativeFigure(int figure_index);
241 
258  void SetFigureAlternateText(int figure_index, const wchar_t* alternate_text);
259 
274  WString GetFigureAlternateText(int figure_index);
275 
288  RectF GetFigureRect(int figure_index);
289 
302  int GetFigurePageIndex(int figure_index);
303 
304 };
305 
306 }
307 }
308 }
309 #endif
RectF GetFigureRect(int figure_index)
获取图形的矩形区域。
void SetFigureAlternateText(int figure_index, const wchar_t *alternate_text)
设置图形替代文本。
Definition: fs_taggedpdf.h:125
virtual void Release()=0
用于释放当前回调对象本身的回调函数。
PDF文档相关定义和类的头文件。
bool SetAsDecorativeFigure(int figure_index)
装饰图形。装饰性图形不能设置替代文本。
int GetFigureCount()
获取标记文档中图形的数量,不包括装饰性图形。
TaggedPDF(const foxit::pdf::PDFDoc &doc)
构造函数。
宽字符串类
Definition: fx_string.h:1457
Definition: fs_pdfdoc.h:771
报告置信度:中等。
Definition: fs_taggedpdf.h:80
报告置信度:中低。
Definition: fs_taggedpdf.h:82
报告类别类型:段落。
Definition: fs_taggedpdf.h:54
TaggedPDF & operator=(const TaggedPDF &other)
赋值操作符。
报告类别类型:区域。
Definition: fs_taggedpdf.h:50
报告类别类型:目录项。
Definition: fs_taggedpdf.h:66
WString GetFigureAlternateText(int figure_index)
获取图形的替代文本。
virtual void Report(ReportCategory category, ReportConfidence confidence, int page_index, const RectF &rect)=0
用于获取标记PDF文档结果信息的回调函数,在文档将被标记时触发。
Definition: fx_basic.h:3737
报告类别类型:人工制品。
Definition: fs_taggedpdf.h:52
common::Progressive StartTagDocument(common::PauseCallback *pause=0)
使用指定的标记设置开始自动标记给定的PDF文档。
Definition: fs_common.h:373
bool IsEmpty() const
检查当前对象是否为空。
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
通用定义和类的头文件。
报告类别类型:列表项。
Definition: fs_taggedpdf.h:56
报告置信度:低。
Definition: fs_taggedpdf.h:84
ReportConfidence
用于标记PDF文档的报告置信度枚举。
Definition: fs_taggedpdf.h:74
Definition: fs_basictypes.h:449
bool operator==(const TaggedPDF &other) const
相等操作符。
PDF页面相关定义和类的头文件。
报告置信度:中高。
Definition: fs_taggedpdf.h:78
Foxit命名空间。
Definition: fs_taggedpdf.h:27
报告类别类型:表格行。
Definition: fs_taggedpdf.h:62
报告类别类型:表格。
Definition: fs_taggedpdf.h:60
报告类别类型:表格标题。
Definition: fs_taggedpdf.h:64
#define NULL
空指针值。
Definition: fx_system.h:792
报告类别类型:图形。
Definition: fs_taggedpdf.h:58
报告置信度:高。
Definition: fs_taggedpdf.h:76
int GetFigurePageIndex(int figure_index)
根据图形索引获取图形页面索引。
void SetCallback(TaggedPDFCallback *callback)
为标记PDF设置回调对象。
ReportCategory
用于标记PDF的报告类别类型枚举。
Definition: fs_taggedpdf.h:48
Definition: fx_coordinates.h:771
bool operator!=(const TaggedPDF &other) const
不相等操作符。