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 
71  explicit FDFDoc(common::file::ReaderCallback* file_read);
72 
81  explicit FDFDoc(Type type);
82 
88  explicit FDFDoc(const char* path);
89 
95  explicit FDFDoc(const wchar_t* path);
96 
104  FDFDoc(const void* buffer, size_t length);
105 
114  explicit FDFDoc(std::ifstream* input_file_stream);
115 
121  FDFDoc(const FDFDoc& other);
129  FDFDoc& operator = (const FDFDoc& other);
130 
138  bool operator == (const FDFDoc& other) const;
146  bool operator != (const FDFDoc& other) const;
147 
149  ~FDFDoc();
150 
158  bool IsEmpty() const;
159 
166  Type GetType() const;
167 
176 
185  bool SetPDFPath(const wchar_t* pdf_path);
186 
204  bool SaveAs(const char* file_path);
205 
223  bool SaveAs(const wchar_t* file_path);
224 
243 
252 
261 
262  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
263  explicit FDFDoc(FS_HANDLE handle = NULL);
264 };
265 } // namespace fdf
266 } // namespace foxit
267 #endif // FS_FDFDOC_H_
268 
pdf::objects::PDFDictionary * GetCatalog() const
Get the catalog dictionary.
file writing interface.
Definition: fx_stream.h:449
bool SetPDFPath(const wchar_t *pdf_path)
Set the path of related PDF document.
Type GetType() const
Get the type of current document object.
Header file for file operation related definitions and functions.
file reading interface.
Definition: fx_stream.h:555
WIDE STRING CLASS.
Definition: fx_string.h:1470
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:216
bool operator!=(const FDFDoc &other) const
Not equal operator.
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:342
WString GetPDFPath()
Get the path of related PDF document.
Definition: fs_pdfobject.h:763
FDFDoc & operator=(const FDFDoc &other)
Assign operator.
Foxit namespace.
Definition: fs_connectedpdf.h:26
#define NULL
The null-pointer value.
Definition: fx_system.h:773
FDFDoc(common::file::ReaderCallback *file_read)
Constructor, with a file read callback object.

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.