|
Foxit PDF SDK
|
Instance Methods | |
| (FSPDFDictionary *) | - getCatalog |
| Get the catalog dictionary. More... | |
| (FSPDFDictionary *) | - getFDFDict |
| Get the dictionary of "FDF" entry from catalog dictionary. More... | |
| (NSString *) | - getPDFPath |
| Get the path of related PDF document. More... | |
| (FSFDFDocType) | - getType |
| Get the type of current document object. More... | |
| (id) | - initWithBuffer: |
| Constructor, from a memory buffer. More... | |
| (id) | - initWithFile_read: |
| Constructor, with a file read callback object. More... | |
| (id) | - initWithOther: |
| Constructor, with another FDF document object. More... | |
| (id) | - initWithPath: |
| Constructor, from an existing FDF or XFDF file path. More... | |
| (id) | - initWithType: |
| Constructor. More... | |
| (BOOL) | - isEmpty |
| Check whether current object is empty or not. More... | |
| (BOOL) | - saveAs: |
| Save current document as another FDF or XFDF file. More... | |
| (BOOL) | - saveAsWithWriterCallback: |
| Save current document as another FDF or XFDF file. More... | |
| (BOOL) | - setPDFPath: |
| Set the path of related PDF document. More... | |
FDF (Forms Data Format) is a kind of file format, used for interactive form data. FDF can be 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. Besides these, FDF can be used to define a container for annotations that are separated from the PDF document to which they apply.
XFDF(XML Forms Data Format) is a version of FDF based on XML. It has similar features with FDF.
In a word, FDF and XFDF contain the subset of a PDF document to describe interactive forms and annotations.
Class FSFDFDoc can be used to represent either FDF or XFDF. A FDF document object can be constructed with an existing file from file path, memory buffer, a custom implemented FSFileReaderCallback object and an input file stream. A FDF document object can also be constructed as a new FDF or XFDF document. This class also offers functions to get or set some information from FDF or XFDF file, and save current FDF/XFDF as another file.
To import or export form fields or annotations, please refer to functions FSPDFDoc::importFromFDF:types:page_range:, FSPDFDoc::exportToFDF:types:page_range: and FSPDFDoc::exportAnnotToFDF:fdf_doc:.
| - (FSPDFDictionary *) getCatalog |
Get the catalog dictionary.
| - (FSPDFDictionary *) getFDFDict |
Get the dictionary of "FDF" entry from catalog dictionary.
| - (NSString *) getPDFPath |
Get the path of related PDF document.
The path can be either an absolute one, or a relative one.
| - (FSFDFDocType) getType |
Get the type of current document object.
| - (id) initWithBuffer: | (NSData *) | buffer |
Constructor, from a memory buffer.
| [in] | buffer | A memory buffer. The FDF or XFDF file data should be fully loaded in this memory buffer. It should not be nil. |
| - (id) initWithFile_read: | (id<FSFileReaderCallback>) | file_read |
Constructor, with a file read callback object.
| [in] | file_read | Pointer to a FSFileReaderCallback object which is implemented by user to load a FDF or XFDF document. It should not be nil. |
| - (id) initWithOther: | (FSFDFDoc*) | other |
Constructor, with another FDF document object.
| [in] | other | Another FDF document object. |
| - (id) initWithPath: | (NSString *) | path |
Constructor, from an existing FDF or XFDF file path.
| [in] | path | A full path of an existing FDF/XFDF file. It should not be an empty string. |
| - (id) initWithType: | (FSFDFDocType) | type |
Constructor.
This constructor is to construct a new FDF document object (without any data).
| [in] | type | FDF document type. It should be one of following values: FSFDFDocFDF, FSFDFDocXFDF |
| - (BOOL) isEmpty |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
| - (BOOL) saveAs: | (NSString *) | file_path |
Save current document as another FDF or XFDF file.
| [in] | file_path | A full path of the new saved FDF or XFDF file. It should not be an empty string. |
| - (BOOL) saveAsWithWriterCallback: | (id<FSFileWriterCallback>) | file |
Save current document as another FDF or XFDF file.
| [in] | file | A FSFileWriterCallback object which is implemented by user to save FDF or XFDF file. |
| - (BOOL) setPDFPath: | (NSString *) | pdf_path |
Set the path of related PDF document.
| [in] | pdf_path | The path of related PDF document. It can be either an absolute path or a relative path. It should not be an empty string. |