Foxit PDF SDK
fs_taggedpdf.h
Go to the documentation of this file.
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 
124 class TaggedPDF FS_FINAL : public Base {
125  public:
133  TaggedPDF(const foxit::pdf::PDFDoc& doc);
134 
135  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
136  explicit TaggedPDF(FS_HANDLE handle);
137 
139  ~TaggedPDF();
140 
146  TaggedPDF(const TaggedPDF& other);
147 
155  TaggedPDF& operator=(const TaggedPDF& other);
156 
164  bool operator==(const TaggedPDF& other) const;
165 
173  bool operator!=(const TaggedPDF& other) const;
174 
182  bool IsEmpty() const;
183 
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)
Get the rectangle of figure.
void SetFigureAlternateText(int figure_index, const wchar_t *alternate_text)
Set figure alternate text.
Definition: fs_taggedpdf.h:124
virtual void Release()=0
A callback function used to release current callback object itself.
Header file for PDF document related definitions and classes.
bool SetAsDecorativeFigure(int figure_index)
Decorate the figure.The decorative figure can not set alternate text.
int GetFigureCount()
Get the count of figures in tagged document,excluding the decorative figures.
TaggedPDF(const foxit::pdf::PDFDoc &doc)
Constructor.
WIDE STRING CLASS.
Definition: fx_string.h:1452
Definition: fs_pdfdoc.h:508
Report confidence: medium.
Definition: fs_taggedpdf.h:80
Report confidence: medium low.
Definition: fs_taggedpdf.h:82
Report category type: paragraph.
Definition: fs_taggedpdf.h:54
TaggedPDF & operator=(const TaggedPDF &other)
Assign operator.
Report category type: region.
Definition: fs_taggedpdf.h:50
Report category type: toc item.
Definition: fs_taggedpdf.h:66
WString GetFigureAlternateText(int figure_index)
Get the alternate text of the figure.
virtual void Report(ReportCategory category, ReportConfidence confidence, int page_index, const RectF &rect)=0
A callback function used to get the tagged PDF document result information, triggered when the docume...
Definition: fx_basic.h:3761
Report category type: artifact.
Definition: fs_taggedpdf.h:52
common::Progressive StartTagDocument(common::PauseCallback *pause=0)
Start to auto tag the given PDF document with specified tagged settings.
Definition: fs_common.h:336
bool IsEmpty() const
Check whether current object is empty or not.
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
Header file for common definitions and classes.
Report category type: list item.
Definition: fs_taggedpdf.h:56
Report confidence: low.
Definition: fs_taggedpdf.h:84
ReportConfidence
Enumeration for report confidence used for tag PDF document.
Definition: fs_taggedpdf.h:74
Definition: fs_basictypes.h:407
bool operator==(const TaggedPDF &other) const
Equal operator.
Header file for PDF page related definitions and classes.
Report confidence: medium high.
Definition: fs_taggedpdf.h:78
Foxit namespace.
Definition: fs_taggedpdf.h:27
Report category type: table row.
Definition: fs_taggedpdf.h:62
Report category type: table.
Definition: fs_taggedpdf.h:60
Report category type: table header.
Definition: fs_taggedpdf.h:64
#define NULL
The null-pointer value.
Definition: fx_system.h:780
Report category type: figure.
Definition: fs_taggedpdf.h:58
Report confidence: high.
Definition: fs_taggedpdf.h:76
int GetFigurePageIndex(int figure_index)
Get the figure page index by the figure index.
void SetCallback(TaggedPDFCallback *callback)
Set a callback object for tagged PDF.
ReportCategory
Enumeration for report category type used for tagged PDF.
Definition: fs_taggedpdf.h:48
Definition: fx_coordinates.h:771
bool operator!=(const TaggedPDF &other) const
Not equal operator.