Loading...
Searching...
No Matches
FDFDoc.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPFDFFDFDoc
6#define PDFTRON_H_CPPFDFFDFDoc
7
8#include <SDF/SDFDoc.h>
9#include <FDF/FDFField.h>
10#include <Common/Iterator.h>
11#include <C/FDF/TRN_FDFDoc.h>
12#include <PDF/Field.h>
14
15namespace pdftron {
16 namespace FDF {
17
30
45class FDFDoc
46{
47public:
48
54 FDFDoc(TRN_FDFDoc impl = 0, bool owner = true);
55
64
70 FDFDoc (const char* filepath);
71 FDFDoc (const UString& filepath);
72
87
97 FDFDoc (const char* buf, size_t buf_size);
98
103
107 void Close();
108
112 bool IsModified () const;
113
134 void Save(const UString& path);
135
142 std::vector<unsigned char> Save();
143
144#ifndef SWIG
156 void Save(const char* &out_buf, size_t& out_buf_size);
157#endif
158
164
171
176
184
191 void SetPDFFileName(const UString& filepath);
192
199
205 void SetID(SDF::Obj id);
206
222
239
240
248 FDFField GetField(const UString& field_name);
249
255 FDFField FieldCreate(const UString& field_name, PDF::Field::Type type, SDF::Obj field_value = 0);
256 FDFField FieldCreate(const UString& field_name, PDF::Field::Type type, const UString& field_value);
257
263
269 static FDFDoc CreateFromXFDF(const UString& file_name);
270
275 void SaveAsXFDF(const UString& filepath);
276
282 void SaveAsXFDF(const UString& filepath, const FDF::XFDFExportOptions& opts);
283
289
296
303 void MergeAnnots( const UString& command_file, const UString& permitted_user = "" );
304
305 FDFDoc(const FDFDoc& other);
306
307// @cond PRIVATE_DOC
308#ifndef SWIGHIDDEN
309 mutable TRN_FDFDoc mp_doc;
310#endif
311// @endcond
312private:
313 FDFDoc& operator=(const FDFDoc& other);
314 mutable bool m_owner;
315};
316
317
318#include <Impl/FDFDoc.inl>
319
320 }; // namespace FDF
321}; // namespace pdftron
322
323#endif // PDFTRON_H_CPPFDFFDFDoc
FDFDoc(SDF::SDFDoc &sdfdoc)
FDFDoc(const UString &filepath)
FDFDoc(const FDFDoc &other)
void SetID(SDF::Obj id)
void SetPDFFileName(const UString &filepath)
void Save(const UString &path)
bool IsModified() const
UString GetPDFFileName()
FDFDoc(const char *filepath)
void MergeAnnots(const UString &command_file, const UString &permitted_user="")
FDFDoc(TRN_FDFDoc impl=0, bool owner=true)
void SaveAsXFDF(const UString &filepath)
FDFDoc(const char *buf, size_t buf_size)
FDFFieldIterator GetFieldIterator(const UString &field_name)
UString SaveAsXFDF(const FDF::XFDFExportOptions &opts)
std::vector< unsigned char > Save()
static FDFDoc CreateFromXFDF(const UString &file_name)
void Save(const char *&out_buf, size_t &out_buf_size)
void SaveAsXFDF(const UString &filepath, const FDF::XFDFExportOptions &opts)
FDFField FieldCreate(const UString &field_name, PDF::Field::Type type, const UString &field_value)
FDFDoc(Filters::Filter stream)
FDFField GetField(const UString &field_name)
SDF::SDFDoc & GetSDFDoc()
FDFFieldIterator GetFieldIterator()
FDFField FieldCreate(const UString &field_name, PDF::Field::Type type, SDF::Obj field_value=0)
Common::Iterator< FDFField > FDFFieldIterator
Definition FDFDoc.h:29