Foxit PDF SDK
fs_pdfassociatefiles.h
浏览该文件的文档.
1 
15 #ifndef FS_PDFASSOCIATE_H_
16 #define FS_PDFASSOCIATE_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/annots/fs_annot.h"
20 
26 namespace foxit {
27 namespace pdf {
28 namespace graphics {
29 class ImageObject;
30 class FormXObject;
31 class GraphicsObject;
32 } // namespace graphics
33 
34 namespace objects {
35 class PDFObject;
36 } // namespace objects
37 class PDFPage;
38 class FileSpec;
39 
51 class AssociatedFiles FS_FINAL : public Base {
52  public:
58  typedef enum _Relationship {
90  } Relationship;
91 
92 
98  AssociatedFiles(const AssociatedFiles& other);
107 
115  bool operator == (const AssociatedFiles& other) const;
123  bool operator != (const AssociatedFiles& other) const;
124 
132  explicit AssociatedFiles(const PDFDoc& pdf_doc);
133 
138 
146  bool IsEmpty() const;
147 
156 
168 
179  FileSpec GetAssociatedFile(objects::PDFObject* pdf_object, int index);
180 
196 
205  void AssociateFile(objects::PDFObject* pdf_object, const FileSpec& file_spec);
206 
224  void AssociateFile(foxit::pdf::graphics::GraphicsObject* graphics_object, int mark_content_item_index,
225  foxit::pdf::objects::PDFObject* current_resource, const char* property_name, const foxit::pdf::FileSpec& file_spec);
226 
238  void AssociateFile(const foxit::pdf::PDFPage& page, const foxit::pdf::FileSpec& file_spec);
239 
252 
264  void AssociateFile(foxit::pdf::graphics::FormXObject* form_xobject, const foxit::pdf::FileSpec& file_spec);
265 
277  void AssociateFile(const foxit::pdf::annots::Annot& annot, const foxit::pdf::FileSpec& file_spec);
278 
289  void RemoveAssociatedFile(objects::PDFObject* pdf_object, int index);
290 
305  void RemoveAssociatedFile(foxit::pdf::graphics::GraphicsObject* graphics_object, int index);
306 
307  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
308  explicit AssociatedFiles(FS_HANDLE handle = NULL);
309 };
310 } // namespace pdf
311 } // namespace foxit
312 
313 #endif
314 
Definition: fs_pdfgraphicsobject.h:232
FileSpec GetAssociatedFile(objects::PDFObject *pdf_object, int index)
通过索引获取指定PDF字典对象中的关联文件(由 FileSpec 表示)。
关系是"数据",表示文件规范代表用于派生视觉呈现的信息 - 例如表格或图形。
Definition: fs_pdfassociatefiles.h:68
Relationship
PDF文档与关联文件之间关系的枚举。
Definition: fs_pdfassociatefiles.h:58
关系是"源",表示文件规范是关联内容的原始源材料。
Definition: fs_pdfassociatefiles.h:64
关系是"替代",表示文件规范是内容的替代表示,例如音频。
Definition: fs_pdfassociatefiles.h:72
在PDF 2.0中,定义了一个名为"关联文件"的新概念。关联文件提供了一种方法来 将其他格式的内容与PDF文件的对象关联,并识别内容与对象之间的关系。 此类关联文件使用文件规范字典(称为文件规范)指定。...
Definition: fs_pdfassociatefiles.h:51
关系是"补充",表示文件规范代表原始源或数据的补充表示,可能更容易使用。
Definition: fs_pdfassociatefiles.h:76
Definition: fs_pdfdoc.h:771
void AssociateFile(objects::PDFObject *pdf_object, const FileSpec &file_spec)
将文件(由 FileSpec 表示)与PDF字典对象关联,该字典对象代表注释、PDF页面或PDF文档中其他对象的字典。
int GetAssociatedFilesCount(objects::PDFObject *pdf_object)
获取PDF字典对象中关联文件的数量,该字典对象代表注释、PDF页面或PDF文档中其他对象的字典。
bool operator !=(const AssociatedFiles &other) const
不等操作符。
注释相关定义和类的头文件。
关系是"模式",表示文件规范是关联对象的模式定义。
Definition: fs_pdfassociatefiles.h:89
Definition: fs_pdfgraphicsobject.h:1497
Definition: fs_pdfpage.h:421
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
通用定义和类的头文件。
bool operator==(const AssociatedFiles &other) const
相等操作符。
关系是"加密负载",表示文件规范是加密负载文档, 如果PDF处理器有解密文档所需的加密过滤器,则应向用户显示。
Definition: fs_pdfassociatefiles.h:81
Definition: fs_basictypes.h:449
void RemoveAssociatedFile(objects::PDFObject *pdf_object, int index)
通过索引移除指定PDF字典对象中的关联文件(由 FileSpec 表示)。
Definition: fs_filespec.h:38
AssociatedFiles & operator=(const AssociatedFiles &other)
赋值操作符。
Definition: fs_annot.h:947
关系未知或无法用其他值描述。
Definition: fs_pdfassociatefiles.h:60
Foxit命名空间。
Definition: fs_taggedpdf.h:27
Definition: fs_pdfobject.h:55
关系是"表单数据",表示文件规范是与PDF文件中"AcroForm"字典关联的数据。
Definition: fs_pdfassociatefiles.h:85
~AssociatedFiles()
析构函数。
bool IsEmpty() const
检查当前对象是否为空。
#define NULL
空指针值。
Definition: fx_system.h:792
AssociatedFiles(const AssociatedFiles &other)
构造函数,通过另一个关联文件对象。
Definition: fs_pdfgraphicsobject.h:1102