Foxit PDF SDK

fs_pdfassociatefiles.h
Go to the documentation of this file.
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
53 class AssociatedFiles FS_FINAL : public Base {
54 public:
60 typedef enum _Relationship {
62 e_RelationshipUnspecified = 0,
67 e_RelationshipSource = 1,
72 e_RelationshipData = 2,
77 e_RelationshipAlternative = 3,
82 e_RelationshipSupplement = 4,
88 e_RelationshipEncryptedPayload = 5,
93 e_RelationshipFormData = 6,
98 e_RelationshipSchema = 7
99 } Relationship;
100
101
107 AssociatedFiles(const AssociatedFiles& other);
115 AssociatedFiles& operator = (const AssociatedFiles& other);
116
124 bool operator == (const AssociatedFiles& other) const;
132 bool operator != (const AssociatedFiles& other) const;
133
142 explicit AssociatedFiles(const PDFDoc& pdf_doc);
143
145 ~AssociatedFiles();
146
154 bool IsEmpty() const;
155
165 int GetAssociatedFilesCount(objects::PDFObject* pdf_object);
166
178 int GetAssociatedFilesCount(foxit::pdf::graphics::GraphicsObject* graphics_object);
179
191 FileSpec GetAssociatedFile(objects::PDFObject* pdf_object, int index);
192
208 FileSpec GetAssociatedFile(foxit::pdf::graphics::GraphicsObject* graphics_object, int index);
209
221 void AssociateFile(objects::PDFObject* pdf_object, const FileSpec& file_spec);
222
245 void AssociateFile(foxit::pdf::graphics::GraphicsObject* graphics_object, int mark_content_item_index,
246 foxit::pdf::objects::PDFObject* current_resource, const char* property_name, const foxit::pdf::FileSpec& file_spec);
247
259 void AssociateFile(const foxit::pdf::PDFPage& page, const foxit::pdf::FileSpec& file_spec);
260
272 void AssociateFile(foxit::pdf::graphics::ImageObject* image, const foxit::pdf::FileSpec& file_spec);
273
286 void AssociateFile(foxit::pdf::graphics::FormXObject* form_xobject, const foxit::pdf::FileSpec& file_spec);
287
299 void AssociateFile(const foxit::pdf::annots::Annot& annot, const foxit::pdf::FileSpec& file_spec);
300
312 void RemoveAssociatedFile(objects::PDFObject* pdf_object, int index);
313
329 void RemoveAssociatedFile(foxit::pdf::graphics::GraphicsObject* graphics_object, int index);
330
331 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
332 explicit AssociatedFiles(FS_HANDLE handle = NULL);
333 };
334 } // namespace pdf
335 } // namespace foxit
336
337 #endif
338
foxit::pdf::graphics::FormXObject
Definition: fs_pdfgraphicsobject.h:1517
foxit::pdf::AssociatedFiles::e_RelationshipSupplement
The relationship is "Supplement" which means the file specification represents a supplemental represe...
Definition: fs_pdfassociatefiles.h:82
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::pdf::FileSpec
Definition: fs_filespec.h:38
foxit::pdf::annots::Annot
Definition: fs_annot.h:1006
foxit::pdf::AssociatedFiles::RemoveAssociatedFile
void RemoveAssociatedFile(objects::PDFObject *pdf_object, int index)
Remove an associated file (represented by FileSpec) in a specified PDF dictionary object,...
foxit::pdf::AssociatedFiles::~AssociatedFiles
~AssociatedFiles()
Destructor.
foxit::pdf::AssociatedFiles
Definition: fs_pdfassociatefiles.h:53
foxit::pdf::AssociatedFiles::GetAssociatedFilesCount
int GetAssociatedFilesCount(objects::PDFObject *pdf_object)
Get the count of associated files in a PDF dictionary object which represents the dictionary of an an...
fs_common.h
Header file for common definitions and classes.
foxit::pdf::AssociatedFiles::operator==
bool operator==(const AssociatedFiles &other) const
Equal operator.
foxit::pdf::AssociatedFiles::Relationship
Relationship
Enumeration for the relationship between PDF document and the associated file.
Definition: fs_pdfassociatefiles.h:60
foxit::pdf::objects::PDFObject
Definition: fs_pdfobject.h:55
foxit::pdf::AssociatedFiles::e_RelationshipData
The relationship is "Data" which means the file specification represents information used to derive a...
Definition: fs_pdfassociatefiles.h:72
foxit::pdf::AssociatedFiles::e_RelationshipEncryptedPayload
The relationship is "Encrypted payload" which means the file specification is an encrypted payload do...
Definition: fs_pdfassociatefiles.h:88
foxit::pdf::AssociatedFiles::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::pdf::AssociatedFiles::operator=
AssociatedFiles & operator=(const AssociatedFiles &other)
Assign operator.
foxit::pdf::graphics::GraphicsObject
Definition: fs_pdfgraphicsobject.h:241
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::AssociatedFiles::e_RelationshipAlternative
The relationship is "Alternative" which means the file specification is an alternative representation...
Definition: fs_pdfassociatefiles.h:77
foxit::pdf::AssociatedFiles::AssociateFile
void AssociateFile(objects::PDFObject *pdf_object, const FileSpec &file_spec)
Associate a file (represented by FileSpec) with a PDF dictionary object which represents the dictiona...
foxit::pdf::graphics::ImageObject
Definition: fs_pdfgraphicsobject.h:1118
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:776
foxit::pdf::AssociatedFiles::GetAssociatedFile
FileSpec GetAssociatedFile(objects::PDFObject *pdf_object, int index)
Get an associated file (represented by FileSpec) in a specified PDF dictionary object,...
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:412
foxit::pdf::AssociatedFiles::operator!=
bool operator!=(const AssociatedFiles &other) const
Not equal operator.
foxit::pdf::AssociatedFiles::e_RelationshipSchema
The relationship is "Schema" which means the file specification is a schema definition for the associ...
Definition: fs_pdfassociatefiles.h:98
foxit::pdf::AssociatedFiles::e_RelationshipUnspecified
The relationship is not known or cannot be described by other values.
Definition: fs_pdfassociatefiles.h:62
fs_annot.h
Header file for annotation related definitions and classes.
foxit::pdf::AssociatedFiles::e_RelationshipFormData
The relationship is "Form data" which means the file specification is the data associated with the "A...
Definition: fs_pdfassociatefiles.h:93
foxit::Base
Definition: fs_basictypes.h:451
foxit::pdf::AssociatedFiles::e_RelationshipSource
The relationship is "Source" which means the file specification is the original source material for t...
Definition: fs_pdfassociatefiles.h:67
foxit::pdf::AssociatedFiles::AssociatedFiles
AssociatedFiles(const AssociatedFiles &other)
Constructor, with another associated files object.