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 
File writing interface.
Definition: fx_stream.h:451
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
bool operator !=(const FDFDoc &other) const
Not equal operator.
FDFDoc(common::file::ReaderCallback *file_read)
Constructor, with a file read callback object.
Header file for common definitions and classes.
File reading interface.
Definition: fx_stream.h:566
Header file for file operation related definitions and functions.
WString GetPDFPath()
Get the path of related PDF document.
Header file for PDF object related definitions and classes.
Foxit namespace.
Definition: fs_compare.h:27
~FDFDoc()
Destructor.
bool SaveAs(const char *file_path)
Save current document as another FDF or XFDF file.
bool IsEmpty() const
Check whether current object is empty or not.
Definition: fs_pdfobject.h:763
#define NULL
The null-pointer value.
Definition: fx_system.h:767
pdf::objects::PDFDictionary * GetCatalog() const
Get the catalog dictionary.
bool operator==(const FDFDoc &other) const
Equal operator.
Definition: fs_fdfdoc.h:51
pdf::objects::PDFDictionary * GetFDFDict() const
Get the dictionary of "FDF" entry from catalog dictionary.
Header file for annotation related definitions and classes.
Type
Enumeration for FDF document type.
Definition: fs_fdfdoc.h:58
FDFDoc & operator=(const FDFDoc &other)
Assign operator.
Type GetType() const
Get the type of current document object.
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
bool SetPDFPath(const wchar_t *pdf_path)
Set the path of related PDF document.
Definition: fs_basictypes.h:399