Foxit PDF SDK
fs_fdfdoc.h
Go to the documentation of this file.
1 
15 #ifndef FS_FDFDOC_H_
16 #define FS_FDFDOC_H_
17 
18 #include "common/fs_common.h"
19 #include "common/file/fs_file.h"
20 #include "pdf/annots/fs_annot.h"
22 
28 namespace foxit {
32 namespace fdf {
51 class FDFDoc FS_FINAL : public Base {
52  public:
58  typedef enum _Type {
60  e_FDF = 0,
62  e_XFDF = 1
63  } Type;
64 
65 
72  explicit FDFDoc(common::file::ReaderCallback* file_read);
73 
82  explicit FDFDoc(Type type);
83 
89  explicit FDFDoc(const char* path);
90 
96  explicit FDFDoc(const wchar_t* path);
97 
105  FDFDoc(const void* buffer, size_t length);
106 
112  FDFDoc(const FDFDoc& other);
120  FDFDoc& operator = (const FDFDoc& other);
121 
129  bool operator == (const FDFDoc& other) const;
137  bool operator != (const FDFDoc& other) const;
138 
140  ~FDFDoc();
141 
149  bool IsEmpty() const;
150 
157  Type GetType() const;
158 
167 
176  bool SetPDFPath(const wchar_t* pdf_path);
177 
195  bool SaveAs(const char* file_path);
196 
214  bool SaveAs(const wchar_t* file_path);
215 
234 
243 
252 
253  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
254  explicit FDFDoc(FS_HANDLE handle = NULL);
255 };
256 } // namespace fdf
257 } // namespace foxit
258 #endif // FS_FDFDOC_H_
259 
pdf::objects::PDFDictionary * GetCatalog() const
Get the catalog dictionary.
File writing interface.
Definition: fx_stream.h:451
bool SetPDFPath(const wchar_t *pdf_path)
Set the path of related PDF document.
Type GetType() const
Get the type of current document object.
bool operator !=(const FDFDoc &other) const
Not equal operator.
Header file for file operation related definitions and functions.
File reading interface.
Definition: fx_stream.h:566
WIDE STRING CLASS.
Definition: fx_string.h:1452
FDF document type: FDF.
Definition: fs_fdfdoc.h:60
FDF document type: XFDF.
Definition: fs_fdfdoc.h:62
~FDFDoc()
Destructor.
bool operator==(const FDFDoc &other) const
Equal operator.
Definition: fs_fdfdoc.h:51
bool SaveAs(const char *file_path)
Save current document as another FDF or XFDF file.
Header file for annotation related definitions and classes.
Type
Enumeration for FDF document type.
Definition: fs_fdfdoc.h:58
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.
Header file for PDF object related definitions and classes.
pdf::objects::PDFDictionary * GetFDFDict() const
Get the dictionary of "FDF" entry from catalog dictionary.
Definition: fs_basictypes.h:397
WString GetPDFPath()
Get the path of related PDF document.
Definition: fs_pdfobject.h:785
FDFDoc & operator=(const FDFDoc &other)
Assign operator.
Foxit namespace.
Definition: fs_compare.h:27
#define NULL
The null-pointer value.
Definition: fx_system.h:767
FDFDoc(common::file::ReaderCallback *file_read)
Constructor, with a file read callback object.