Foxit PDF SDK
fs_pdfstructtree.h
浏览该文件的文档.
1 
15 #ifndef FS_PDFSSTRUCTTREE_H_
16 #define FS_PDFSSTRUCTTREE_H_
17 
18 #include "common/fs_common.h"
20 
26 namespace foxit {
30 namespace pdf {
31  // forward declaration
32  class PDFPage;
33 
37 namespace objects {
41 class StructTreeEntity : public Base {
42  public:
48  typedef enum _StructTreeEntityType {
67 
68 
71 
74 
75  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
76  explicit StructTreeEntity(FS_HANDLE handle);
77 
83  StructTreeEntity(const StructTreeEntity& other);
84 
93 
101  bool operator == (const StructTreeEntity& other) const;
102 
110  bool operator != (const StructTreeEntity& other) const;
111 
119  bool IsEmpty() const;
120 
128 
134  PDFPage GetPage() const;
135 };
136 
140 class StructElement FS_FINAL : public StructTreeEntity {
141  public:
147  typedef enum _ElementInfoType {
169  } ElementInfoType;
170 
171 
174 
180  StructElement(const StructElement& other);
181 
187  StructElement(const StructTreeEntity& other);
188 
189  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
190  explicit StructElement(FS_HANDLE handle);
191 
194 
206 
212  int GetChildCount() const;
213 
222  StructTreeEntity GetChild(int index);
223 
232  void RemoveChild(int index);
233 
243  bool HasElementInfo(ElementInfoType type) const;
244 
257 
265  };
266 
270 class StructMarkedContent FS_FINAL : public StructTreeEntity {
271  public:
274 
281 
288 
289  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
290  explicit StructMarkedContent(FS_HANDLE handle);
291 
294 
302 
308  uint32 GetMCID() const;
309 
319 
326 };
327 
331 class StructObjectContent FS_FINAL : public StructTreeEntity {
332  public:
338  typedef enum _StructObjectType {
350 
351 
354 
361 
368 
369  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
370  explicit StructObjectContent(FS_HANDLE handle);
371 
374 
382 
390 
401 };
402 
417 class PDFStructTree FS_FINAL : public Base {
418  public:
427  PDFStructTree(const PDFDoc& document);
428 
430  ~PDFStructTree();
431 
437  PDFStructTree(const PDFStructTree& other);
438 
446  PDFStructTree& operator = (const PDFStructTree& other);
447 
455  bool operator == (const PDFStructTree& other) const;
463  bool operator != (const PDFStructTree& other) const;
464 
472  bool IsEmpty() const;
473 
479  int GetChildCount() const;
480 
489  StructElement GetChild(int index) const;
490 
499  void RemoveChild(int index);
500 
501  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
502  explicit PDFStructTree(FS_HANDLE handle);
503 };
504 } // namespace objects
505 } // namespace pdf
506 } // namespace foxit
507 #endif // FS_PDFSTRUCTTREE_H_
508 
foxit::pdf::objects::StructElement::RemoveChild
void RemoveChild(int index)
通过索引删除子结构树实体。
foxit::pdf::objects::StructElement::HasElementInfo
bool HasElementInfo(ElementInfoType type) const
检查特定类型的结构元素信息是否存在。
foxit::pdf::objects::StructTreeEntity::e_StructTreeEntityTypeMarkedContent
结构树实体类型:MarkedContent,表示标记内容项。
Definition: fs_pdfstructtree.h:60
foxit::pdf::objects::PDFStructTree::PDFStructTree
PDFStructTree(const PDFDoc &document)
带参数的构造函数。
foxit::pdf::objects::StructTreeEntity::e_UnknownType
结构树实体类型:未知。
Definition: fs_pdfstructtree.h:52
foxit::pdf::objects::StructElement
Definition: fs_pdfstructtree.h:140
foxit::pdf::objects::PDFStructTree::~PDFStructTree
~PDFStructTree()
析构函数。
foxit::FS_HANDLE
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
foxit::pdf::objects::StructMarkedContent
Definition: fs_pdfstructtree.h:270
foxit::pdf::objects::StructTreeEntity::StructTreeEntityType
StructTreeEntityType
结构树实体类型的枚举。
Definition: fs_pdfstructtree.h:48
foxit::pdf::objects::StructMarkedContent::GetParentElement
StructElement GetParentElement()
获取父结构元素。
foxit::pdf::objects::StructElement::ElementInfoType
ElementInfoType
结构元素信息类型的枚举。
Definition: fs_pdfstructtree.h:147
foxit::pdf::objects::StructMarkedContent::~StructMarkedContent
~StructMarkedContent()
析构函数。
Definition: fs_pdfstructtree.h:293
foxit::pdf::objects::StructElement::e_ElementInfoTypeExpandedForm
结构元素信息类型:Expanded Form,表示结构元素的扩展形式。
Definition: fs_pdfstructtree.h:164
foxit::pdf::objects::PDFStructTree::GetChildCount
int GetChildCount() const
获取当前PDF结构树中结构元素的数量。
foxit::pdf::objects::StructTreeEntity::~StructTreeEntity
~StructTreeEntity()
析构函数。
fs_common.h
通用定义和类的头文件。
foxit::pdf::objects::StructObjectContent::GetParentElement
StructElement GetParentElement()
获取父结构元素。
foxit::pdf::objects::StructTreeEntity::operator!=
bool operator!=(const StructTreeEntity &other) const
不等操作符。
foxit::pdf::objects::StructTreeEntity::GetPage
PDFPage GetPage() const
获取相关的PDF页面。
foxit::pdf::objects::StructElement::e_ElementInfoTypeActualText
结构元素信息类型:Actual Text,表示结构元素的实际文本。
Definition: fs_pdfstructtree.h:168
foxit::pdf::objects::StructTreeEntity::StructTreeEntity
StructTreeEntity()
构造函数。
Definition: fs_pdfstructtree.h:70
foxit::pdf::objects::StructTreeEntity::operator==
bool operator==(const StructTreeEntity &other) const
相等操作符。
foxit::pdf::objects::StructObjectContent
Definition: fs_pdfstructtree.h:331
foxit::pdf::objects::StructObjectContent::e_StructObjectTypeImage
图像对象。
Definition: fs_pdfstructtree.h:344
foxit::pdf::objects::StructTreeEntity
Definition: fs_pdfstructtree.h:41
foxit::pdf::objects::StructMarkedContent::GetMCID
uint32 GetMCID() const
获取标记内容标识符(MCID)。
CFX_ByteString
字节字符串类
Definition: fx_string.h:317
foxit::pdf::objects::StructObjectContent::StructObjectContent
StructObjectContent()
构造函数。
Definition: fs_pdfstructtree.h:353
foxit::pdf::objects::StructObjectContent::~StructObjectContent
~StructObjectContent()
析构函数。
Definition: fs_pdfstructtree.h:373
foxit::pdf::objects::StructElement::GetChild
StructTreeEntity GetChild(int index)
通过索引获取子结构树实体。
foxit::pdf::objects::StructElement::e_ElementInfoTypeTitle
结构元素信息类型:Title,表示结构元素的标题。以人类可读形式表示的文本字符串。
Definition: fs_pdfstructtree.h:151
foxit::pdf::objects::PDFStructTree
Definition: fs_pdfstructtree.h:417
foxit::pdf::objects::StructTreeEntity::GetType
StructTreeEntityType GetType() const
获取结构树实体类型。
foxit::pdf::objects::PDFStructTree::operator==
bool operator==(const PDFStructTree &other) const
相等操作符。
fs_pdfobject.h
PDF对象相关定义和类的头文件。
foxit::pdf::objects::StructObjectContent::e_UnknownType
未知类型。
Definition: fs_pdfstructtree.h:340
foxit::pdf::objects::PDFStructTree::GetChild
StructElement GetChild(int index) const
通过索引获取结构元素。
foxit::pdf::objects::StructTreeEntity::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit
Foxit命名空间。
Definition: fs_taggedpdf.h:27
foxit::pdf::objects::PDFDictionary
Definition: fs_pdfobject.h:848
foxit::pdf::objects::StructTreeEntity::e_StructTreeEntityTypeObjectContent
结构树实体类型:ObjectContent,表示PDF对象内容项, 如注释和XObject。
Definition: fs_pdfstructtree.h:65
foxit::pdf::objects::StructElement::GetChildCount
int GetChildCount() const
获取当前结构元素中子结构树实体的数量。
foxit::pdf::objects::StructElement::~StructElement
~StructElement()
析构函数。
Definition: fs_pdfstructtree.h:193
foxit::pdf::objects::StructObjectContent::e_StructObjectTypeForm
表单对象。
Definition: fs_pdfstructtree.h:346
foxit::pdf::objects::PDFStructTree::RemoveChild
void RemoveChild(int index)
通过索引删除结构元素。
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:771
foxit::pdf::objects::StructElement::StructElement
StructElement()
构造函数。
Definition: fs_pdfstructtree.h:173
foxit::pdf::objects::StructTreeEntity::e_StructTreeEntityTypeElement
结构树实体类型:Element,表示结构元素。
Definition: fs_pdfstructtree.h:56
foxit::pdf::objects::StructObjectContent::GetObjectType
StructObjectType GetObjectType() const
获取相关对象类型。
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:421
foxit::pdf::objects::StructObjectContent::e_StructObjectTypeAnnot
注释对象。
Definition: fs_pdfstructtree.h:348
foxit::pdf::objects::PDFStructTree::operator!=
bool operator!=(const PDFStructTree &other) const
不等操作符。
foxit::pdf::objects::StructElement::e_ElementInfoTypeAltDescription
结构元素信息类型:Alternative Description,表示结构元素的替代描述。
Definition: fs_pdfstructtree.h:160
foxit::pdf::objects::StructObjectContent::StructObjectType
StructObjectType
对象类型的枚举。
Definition: fs_pdfstructtree.h:338
foxit::pdf::objects::StructElement::GetElementInfo
WString GetElementInfo(ElementInfoType type) const
获取结构元素信息。
foxit::pdf::objects::PDFStructTree::operator=
PDFStructTree & operator=(const PDFStructTree &other)
赋值操作符。
foxit::pdf::objects::StructObjectContent::e_StructObjectTypeInvalid
无效对象。
Definition: fs_pdfstructtree.h:342
CFX_WideString
宽字符串类
Definition: fx_string.h:1457
foxit::pdf::objects::StructObjectContent::GetDict
pdf::objects::PDFDictionary * GetDict() const
获取相关对象的PDF字典。
foxit::pdf::objects::StructMarkedContent::GetStmDict
pdf::objects::PDFDictionary * GetStmDict() const
获取包含标记内容序列的内容流的PDF字典。
foxit::pdf::objects::StructMarkedContent::GetStmOwnerDict
pdf::objects::PDFDictionary * GetStmOwnerDict() const
获取内容流所有者的PDF字典。
foxit::pdf::objects::StructElement::e_ElementInfoTypeLanguage
结构元素信息类型:Language,表示结构元素中所有文本的 自然语言,除非被嵌套结构元素或标记内容的语言规范覆盖。
Definition: fs_pdfstructtree.h:156
foxit::uint32
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:196
foxit::pdf::objects::StructElement::GetStructureTypeName
String GetStructureTypeName() const
获取结构类型名称。
foxit::pdf::objects::StructMarkedContent::StructMarkedContent
StructMarkedContent()
构造函数。
Definition: fs_pdfstructtree.h:273
foxit::Base
Definition: fs_basictypes.h:449
foxit::pdf::objects::StructElement::GetParentElement
StructElement GetParentElement()
获取父结构元素。
foxit::pdf::objects::StructTreeEntity::operator=
StructTreeEntity & operator=(const StructTreeEntity &other)
赋值操作符。
foxit::pdf::objects::PDFStructTree::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。