![]() |
#include <FDFDoc.h>
Public Member Functions | |
FDFDoc () | |
Default constructor. | |
FDFDoc (SDF::SDFDoc &sdfdoc) | |
Create a FDF document from an existing SDF/Cos document. | |
FDFDoc (const char *filepath) | |
Open an existing FDF document. | |
FDFDoc (const UString &filepath) | |
FDFDoc (Filters::Filter stream) | |
Open an existing FDF document. | |
FDFDoc (const char *buf, size_t buf_size) | |
Open a SDF/Cos document from a memory buffer. | |
~FDFDoc () | |
Destructor. | |
bool | IsModified () const |
void | Save (const UString &path) |
Saves the document to a file. | |
void | Save (const char *&out_buf, size_t &out_buf_size) |
Saves the document to a memory buffer. | |
SDF::Obj | GetTrailer () |
SDF::Obj | GetRoot () |
SDF::Obj | GetFDF () |
UString | GetPDFFileName () |
Get the PDF document file that this FDF file was exported from or is intended to be imported into. | |
void | SetPDFFileName (const UString &filepath) |
Set the PDF document file that this FDF file was exported from or is intended to be imported into. | |
SDF::Obj | GetID () |
Get the ID entry from "/Root/FDF" dictionary. | |
void | SetID (SDF::Obj id) |
Set the ID entry in "/Root/FDF" dictionary. | |
FDFFieldIterator | GetFieldIterator () |
An interactive form (sometimes referred to as an AcroForm) is a collection of fields for gathering information interactively from the user. | |
FDFFieldIterator | GetFieldIterator (const UString &field_name) |
FDFField | GetField (const UString &field_name) |
field_name - a string representing the fully qualified name of the field (e.g. | |
FDFField | FieldCreate (const UString &field_name, PDF::Field::Type type, SDF::Obj field_value=0) |
Create a new interactive form FDFField. | |
FDFField | FieldCreate (const UString &field_name, PDF::Field::Type type, const UString &field_value) |
SDF::SDFDoc & | GetSDFDoc () |
void | SaveAsXFDF (const UString &filepath) |
Static Public Member Functions | |
static FDFDoc | CreateFromXFDF (const UString &filepath) |
Convert FDF file to and from XFDF file. |
FDF is typically used when submitting form data to a server, receiving the response, and incorporating it into the interactive form. It can also be used to export form data to stand-alone files that can be stored, transmitted electronically, and imported back into the corresponding PDF interactive form. In addition, beginning in PDF 1.3, FDF can be used to define a container for annotations that are separate from the PDF document to which they apply.
pdftron::FDF::FDFDoc::FDFDoc | ( | ) |
Default constructor.
Creates an empty new document.
pdftron::FDF::FDFDoc::FDFDoc | ( | SDF::SDFDoc & | sdfdoc | ) |
pdftron::FDF::FDFDoc::FDFDoc | ( | const char * | filepath | ) |
pdftron::FDF::FDFDoc::FDFDoc | ( | const UString & | filepath | ) |
pdftron::FDF::FDFDoc::FDFDoc | ( | Filters::Filter | stream | ) |
Open an existing FDF document.
stream | - input stream containing a serialized document. The input stream may be a random-access file, memory buffer, slow HTTP connection etc. |
Make sure to call InitSecurityHandler() after FDFDoc(...) for encrypted documents.
pdftron::FDF::FDFDoc::FDFDoc | ( | const char * | buf, | |
size_t | buf_size | |||
) |
Open a SDF/Cos document from a memory buffer.
the buffer ownership is not transfered to the Document so the user should clean-up if necessary.
buf | - a memory buffer containing the serialized document | |
buf_size | - the size of memory buffer. |
pdftron::FDF::FDFDoc::~FDFDoc | ( | ) |
Destructor.
bool pdftron::FDF::FDFDoc::IsModified | ( | ) | const |
void pdftron::FDF::FDFDoc::Save | ( | const UString & | path | ) |
Saves the document to a file.
If a full save is requested to the original path, the file is saved to a file system-determined temporary file, the old file is deleted, and the temporary file is renamed to path.
A full save with remove unused or linearization option may re-arrange object in the cross reference table. Therefore all pointers and references to document objects and resources should be re acquired in order to continue document editing.
In order to use incremental save the specified path must match original path and e_incremental flag bit should be set.
path | - The full path name to which the file is saved. |
- | if the file can't be opened for saving or if there is a problem during Save an Exception object will be thrown. |
void pdftron::FDF::FDFDoc::Save | ( | const char *& | out_buf, | |
size_t & | out_buf_size | |||
) |
Saves the document to a memory buffer.
out_buf | a pointer to the buffer containing the serialized version of the document. (C++ Note) The buffer is owned by a document and the client doesn't need to do any initialization or cleanup. | |
out_buf_size | the size of the serialized document (i.e. out_buf) in bytes. |
- | if there is a problem during Save an Exception object will be thrown. |
SDF::Obj pdftron::FDF::FDFDoc::GetTrailer | ( | ) |
SDF::Obj pdftron::FDF::FDFDoc::GetRoot | ( | ) |
SDF::Obj pdftron::FDF::FDFDoc::GetFDF | ( | ) |
UString pdftron::FDF::FDFDoc::GetPDFFileName | ( | ) |
void pdftron::FDF::FDFDoc::SetPDFFileName | ( | const UString & | filepath | ) |
SDF::Obj pdftron::FDF::FDFDoc::GetID | ( | ) |
Get the ID entry from "/Root/FDF" dictionary.
void pdftron::FDF::FDFDoc::SetID | ( | SDF::Obj | id | ) |
Set the ID entry in "/Root/FDF" dictionary.
id | - ID array object. |
FDFFieldIterator pdftron::FDF::FDFDoc::GetFieldIterator | ( | ) |
An interactive form (sometimes referred to as an AcroForm) is a collection of fields for gathering information interactively from the user.
A FDF document may contain any number of fields appearing on any combination of pages, all of which make up a single, global interactive form spanning the entire document.
The following methods are used to access and manipulate Interactive form fields (sometimes referred to as AcroForms).
FDFFieldIterator pdftron::FDF::FDFDoc::GetFieldIterator | ( | const UString & | field_name | ) |
field_name - a string representing the fully qualified name of the field (e.g.
"employee.name.first").
FDFField pdftron::FDF::FDFDoc::FieldCreate | ( | const UString & | field_name, | |
PDF::Field::Type | type, | |||
SDF::Obj | field_value = 0 | |||
) |
FDFField pdftron::FDF::FDFDoc::FieldCreate | ( | const UString & | field_name, | |
PDF::Field::Type | type, | |||
const UString & | field_value | |||
) |
SDF::SDFDoc& pdftron::FDF::FDFDoc::GetSDFDoc | ( | ) |
Convert FDF file to and from XFDF file.
void pdftron::FDF::FDFDoc::SaveAsXFDF | ( | const UString & | filepath | ) |