Show / Hide Table of Contents

Class FDFDoc

FDFDoc is a class representing Forms Data Format (FDF) documents. 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.

Inheritance
System.Object
FDFDoc
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: pdftron.FDF
Assembly: PDFTronDotNet.dll
Syntax
public class FDFDoc : IDisposable

Constructors

| Improve this Doc View Source

FDFDoc()

Default constructor. Creates an empty FDF document.

Declaration
public FDFDoc()
| Improve this Doc View Source

FDFDoc(FDFDoc)

Declaration
public FDFDoc(FDFDoc other)
Parameters
Type Name Description
FDFDoc other
| Improve this Doc View Source

FDFDoc(Filter)

Open an existing FDF document from an InputStream.

Declaration
public FDFDoc(Filter stream)
Parameters
Type Name Description
Filter stream
  • input stream containing a serialized document.
Remarks

Make sure to call InitSecurityHandler() after FDFDoc(...) for encrypted documents.

| Improve this Doc View Source

FDFDoc(SDFDoc)

Create a FDF document from an existing SDF/Cos document.

Declaration
public FDFDoc(SDFDoc sdfdoc)
Parameters
Type Name Description
SDFDoc sdfdoc

An SDF document. Created FDFDoc will take the ownership of the low-level document.

| Improve this Doc View Source

FDFDoc(Byte[], Int32)

Open an existing FDF document from an InputStream.

Declaration
public FDFDoc(byte[] buf, int buf_size)
Parameters
Type Name Description
System.Byte[] buf
  • input stream containing a serialized document.
System.Int32 buf_size
  • the expected size of the input stream.
Remarks

Make sure to call InitSecurityHandler() after FDFDoc(...) for encrypted documents.

| Improve this Doc View Source

FDFDoc(String)

Create a new FDFDoc from XFDF input. Input can be either a XFDF file path, or the XFDF data itself.

Declaration
public FDFDoc(string xfdf)
Parameters
Type Name Description
System.String xfdf

string containing either the file path to a XFDF file, or the XML buffer containing the XFDF.

Methods

| Improve this Doc View Source

Close()

Close FDFDoc and release associated resources

Declaration
public void Close()
| Improve this Doc View Source

CreateFromXFDF(String)

Create a new FDFDoc from XFDF input. Input can be either a XFDF file path, or the XFDF data itself.

Declaration
public static FDFDoc CreateFromXFDF(string xfdf)
Parameters
Type Name Description
System.String xfdf

string containing either the file path to a XFDF file, or the XML buffer containing the XFDF.

Returns
Type Description
FDFDoc

created FDFDoc

| Improve this Doc View Source

Destroy()

Declaration
public void Destroy()
| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

Dispose(Boolean)

Declaration
protected void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing
| Improve this Doc View Source

FieldCreate(String, Int32)

Create a new interactive form FDFField.

Declaration
public FDFField FieldCreate(string field_name, int type)
Parameters
Type Name Description
System.String field_name

the field_name

System.Int32 type

the field_type

Returns
Type Description
FDFField

the fDF field

| Improve this Doc View Source

FieldCreate(String, Int32, Obj)

Create a FDFField with specified name, type and string value

Declaration
public FDFField FieldCreate(string field_name, int type, Obj field_value)
Parameters
Type Name Description
System.String field_name

the field_name

System.Int32 type

the field_type

Obj field_value

the field_value

Returns
Type Description
FDFField

the FDF field

| Improve this Doc View Source

FieldCreate(String, Int32, String)

Create a FDFField with specified name, type and value

Declaration
public FDFField FieldCreate(string field_name, int type, string field_value)
Parameters
Type Name Description
System.String field_name

the field_name

System.Int32 type

the field_type

System.String field_value

the field_value

Returns
Type Description
FDFField

the FDF field

| Improve this Doc View Source

Finalize()

Releases all resources used by the FDFDoc

Declaration
protected void Finalize()
| Improve this Doc View Source

GetFDF()

Get the FDF dictionary.

Declaration
public Obj GetFDF()
Returns
Type Description
Obj

the FDF dictionary located in "/Root" or NULL if dictionary is not present.

| Improve this Doc View Source

GetField(String)

field_name a string representing the fully qualified name of the field (e.g. "employee.name.first").

Declaration
public FDFField GetField(string field_name)
Parameters
Type Name Description
System.String field_name

the field_name

Returns
Type Description
FDFField

a FDFFieldIterator referring to the given interactive FDFField or if the field name was not found HasNext() will return false.

| Improve this Doc View Source

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).

Declaration
public FDFFieldIterator GetFieldIterator()
Returns
Type Description
FDFFieldIterator

an iterator to the first Filed in the document.

Remarks

if the document has no AcroForms, HasNext()

| Improve this Doc View Source

GetFieldIterator(String)

Get the field iterator.

Declaration
public FDFFieldIterator GetFieldIterator(string field_name)
Parameters
Type Name Description
System.String field_name

the field_name

Returns
Type Description
FDFFieldIterator

the field iterator

| Improve this Doc View Source

GetID()

Get the ID entry from "/Root/FDF" dictionary.

Declaration
public Obj GetID()
Returns
Type Description
Obj

An object representing the ID entry in "/Root/FDF" dictionary.

| Improve this Doc View Source

GetPdfFileName()

Get the PDF document file that this FDF file was exported from or is intended to be imported into.

Declaration
public string GetPdfFileName()
Returns
Type Description
System.String

a String with the PDF document file name.

| Improve this Doc View Source

GetRoot()

Get the root.

Declaration
public Obj GetRoot()
Returns
Type Description
Obj

A dictionary representing the Cos root of the document (/Root entry within the trailer dictionary)

| Improve this Doc View Source

GetSDFDoc()

Get the SDFDoc object in FDFDoc

Declaration
public SDFDoc GetSDFDoc()
Returns
Type Description
SDFDoc

document's SDF/Cos document

| Improve this Doc View Source

GetTrailer()

Get the trailer.

Declaration
public Obj GetTrailer()
Returns
Type Description
Obj

A dictionary representing the Cos root of the document (document's trailer)

| Improve this Doc View Source

IsModified()

determine whether the document is modified

Declaration
public bool IsModified()
Returns
Type Description
System.Boolean

true if document was modified, false otherwise

| Improve this Doc View Source

MergeAnnots(String)

Merge annotations into FDF document from an XML command.

Declaration
public void MergeAnnots(string command_file)
Parameters
Type Name Description
System.String command_file

the path to XML command file, or the XML command itself

| Improve this Doc View Source

MergeAnnots(String, String)

Merge annotations into FDF document from an XML command.

Declaration
public void MergeAnnots(string command_file, string permitted_user)
Parameters
Type Name Description
System.String command_file

the path to XML command file, or the XML command itself

System.String permitted_user

the user name of the permitted user

| Improve this Doc View Source

Save()

Declaration
public byte[] Save()
Returns
Type Description
System.Byte[]
| Improve this Doc View Source

Save(String)

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.

Declaration
public void Save(string path)
Parameters
Type Name Description
System.String path

The full path name to which the file is saved.

| Improve this Doc View Source

SaveAsXFDF(XFDFExportOptions)

Save a FDF document into a XFDF string.

Declaration
public string SaveAsXFDF(XFDFExportOptions options = null)
Parameters
Type Name Description
XFDFExportOptions options
Returns
Type Description
System.String

String containing the XFDF representation of the FDF document

| Improve this Doc View Source

SaveAsXFDF(String, XFDFExportOptions)

Save a FDF document in XFDF format.

Declaration
public void SaveAsXFDF(string file_name, XFDFExportOptions options = null)
Parameters
Type Name Description
System.String file_name

the path

XFDFExportOptions options
| Improve this Doc View Source

SetID(Obj)

Set the ID entry in "/Root/FDF" dictionary.

Declaration
public void SetID(Obj id)
Parameters
Type Name Description
Obj id

ID array object.

| Improve this Doc View Source

SetPdfFileName(String)

Set the PDF document file that this FDF file was exported from or is intended to be imported into.

Declaration
public void SetPdfFileName(string filepath)
Parameters
Type Name Description
System.String filepath

pathname to the file.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX