Table of Contents

Class PdfFormFactory

Namespace
iText.Forms.Fields
Assembly
itext.forms.dll

Default factory for form related instances creation.

public class PdfFormFactory
Inheritance
PdfFormFactory
Inherited Members

Constructors

PdfFormFactory()

Create PdfFormFactory instance.

public PdfFormFactory()

Methods

CreateButtonFormField(PdfWidgetAnnotation, PdfDocument)

Creates a button form field as a parent of a PdfWidgetAnnotation.

public virtual PdfButtonFormField CreateButtonFormField(PdfWidgetAnnotation widget, PdfDocument document)

Parameters

widget PdfWidgetAnnotation

The widget which will be a kid of the PdfButtonFormField.

document PdfDocument

The PdfDocument instance.

Returns

PdfButtonFormField

created PdfButtonFormField

CreateButtonFormField(PdfDictionary)

Creates a button form field as a wrapper object around a PdfDictionary.

public virtual PdfButtonFormField CreateButtonFormField(PdfDictionary dictionary)

Parameters

dictionary PdfDictionary

the dictionary to be wrapped, must have an indirect reference.

Returns

PdfButtonFormField

created PdfButtonFormField

Remarks

Creates a button form field as a wrapper object around a PdfDictionary. This PdfDictionary must be an indirect object.

CreateButtonFormField(PdfDocument)

Create a minimal, empty PdfButtonFormField.

public virtual PdfButtonFormField CreateButtonFormField(PdfDocument document)

Parameters

document PdfDocument

The PdfDocument instance.

Returns

PdfButtonFormField

created PdfButtonFormField

CreateChoiceFormField(PdfWidgetAnnotation, PdfDocument)

Creates a choice form field as a parent of a PdfWidgetAnnotation.

public virtual PdfChoiceFormField CreateChoiceFormField(PdfWidgetAnnotation widget, PdfDocument document)

Parameters

widget PdfWidgetAnnotation

The widget which will be a kid of the PdfChoiceFormField.

document PdfDocument

The PdfDocument instance.

Returns

PdfChoiceFormField

created PdfChoiceFormField

CreateChoiceFormField(PdfDictionary)

Creates a choice form field as a wrapper object around a PdfDictionary.

public virtual PdfChoiceFormField CreateChoiceFormField(PdfDictionary dictionary)

Parameters

dictionary PdfDictionary

the dictionary to be wrapped, must have an indirect reference.

Returns

PdfChoiceFormField

created PdfChoiceFormField

Remarks

Creates a choice form field as a wrapper object around a PdfDictionary. This PdfDictionary must be an indirect object.

CreateChoiceFormField(PdfDocument)

Create a minimal, empty PdfChoiceFormField.

public virtual PdfChoiceFormField CreateChoiceFormField(PdfDocument document)

Parameters

document PdfDocument

The PdfDocument instance.

Returns

PdfChoiceFormField

created PdfChoiceFormField

CreateFormAnnotation(PdfWidgetAnnotation, PdfDocument)

Creates a form field annotation as a wrapper of a PdfWidgetAnnotation.

public virtual PdfFormAnnotation CreateFormAnnotation(PdfWidgetAnnotation widget, PdfDocument document)

Parameters

widget PdfWidgetAnnotation

The widget which will be a kid of the PdfFormField

document PdfDocument

The PdfDocument instance.

Returns

PdfFormAnnotation

created PdfFormAnnotation

CreateFormAnnotation(PdfDictionary)

Creates a form field annotation as a wrapper object around a PdfDictionary.

public virtual PdfFormAnnotation CreateFormAnnotation(PdfDictionary dictionary)

Parameters

dictionary PdfDictionary

the dictionary to be wrapped, must have an indirect reference.

Returns

PdfFormAnnotation

created PdfFormAnnotation

Remarks

Creates a form field annotation as a wrapper object around a PdfDictionary. This PdfDictionary must be an indirect object.

CreateFormField(PdfWidgetAnnotation, PdfDocument)

Creates a form field as a parent of a PdfWidgetAnnotation.

public virtual PdfFormField CreateFormField(PdfWidgetAnnotation widget, PdfDocument document)

Parameters

widget PdfWidgetAnnotation

The widget which will be a kid of the PdfFormField.

document PdfDocument

The PdfDocument instance.

Returns

PdfFormField

created PdfFormField

CreateFormField(PdfDictionary)

Creates a form field as a wrapper object around a PdfDictionary.

public virtual PdfFormField CreateFormField(PdfDictionary dictionary)

Parameters

dictionary PdfDictionary

the dictionary to be wrapped, must have an indirect reference.

Returns

PdfFormField

created PdfFormField

Remarks

Creates a form field as a wrapper object around a PdfDictionary. This PdfDictionary must be an indirect object.

CreateFormField(PdfDocument)

Create a minimal, empty PdfFormField.

public virtual PdfFormField CreateFormField(PdfDocument document)

Parameters

document PdfDocument

The PdfDocument instance.

Returns

PdfFormField

created PdfFormField

CreateSignatureFormField(PdfWidgetAnnotation, PdfDocument)

Creates a signature form field as a parent of a PdfWidgetAnnotation.

public virtual PdfSignatureFormField CreateSignatureFormField(PdfWidgetAnnotation widget, PdfDocument document)

Parameters

widget PdfWidgetAnnotation

The widget which will be a kid of the PdfSignatureFormField.

document PdfDocument

The PdfDocument instance.

Returns

PdfSignatureFormField

created PdfSignatureFormField

CreateSignatureFormField(PdfDictionary)

Creates a signature form field as a wrapper object around a PdfDictionary.

public virtual PdfSignatureFormField CreateSignatureFormField(PdfDictionary dictionary)

Parameters

dictionary PdfDictionary

the dictionary to be wrapped, must have an indirect reference.

Returns

PdfSignatureFormField

created PdfSignatureFormField

Remarks

Creates a signature form field as a wrapper object around a PdfDictionary. This PdfDictionary must be an indirect object.

CreateSignatureFormField(PdfDocument)

Create a minimal, empty PdfSignatureFormField.

public virtual PdfSignatureFormField CreateSignatureFormField(PdfDocument document)

Parameters

document PdfDocument

The PdfDocument instance.

Returns

PdfSignatureFormField

created PdfSignatureFormField

CreateTextFormField(PdfWidgetAnnotation, PdfDocument)

Creates a text form field as a parent of a PdfWidgetAnnotation.

public virtual PdfTextFormField CreateTextFormField(PdfWidgetAnnotation widget, PdfDocument document)

Parameters

widget PdfWidgetAnnotation

The widget which will be a kid of the PdfTextFormField.

document PdfDocument

The PdfDocument instance.

Returns

PdfTextFormField

created PdfTextFormField

CreateTextFormField(PdfDictionary)

Creates a text form field as a wrapper object around a PdfDictionary.

public virtual PdfTextFormField CreateTextFormField(PdfDictionary dictionary)

Parameters

dictionary PdfDictionary

the dictionary to be wrapped, must have an indirect reference.

Returns

PdfTextFormField

created PdfTextFormField

Remarks

Creates a text form field as a wrapper object around a PdfDictionary. This PdfDictionary must be an indirect object.

CreateTextFormField(PdfDocument)

Create a minimal, empty PdfTextFormField.

public virtual PdfTextFormField CreateTextFormField(PdfDocument document)

Parameters

document PdfDocument

The PdfDocument instance.

Returns

PdfTextFormField

created PdfTextFormField

GetAcroForm(PdfDocument, bool)

Retrieves AcroForm from the document.

public virtual PdfAcroForm GetAcroForm(PdfDocument document, bool createIfNotExist)

Parameters

document PdfDocument

the document to retrieve the PdfAcroForm from

createIfNotExist bool

when true, this method will create a PdfAcroForm if none exists for this document

Returns

PdfAcroForm

the document 's AcroForm, or a new one provided that createIfNotExist parameter is true, otherwise null.

Remarks

Retrieves AcroForm from the document. If there is no AcroForm in the document Catalog and createIfNotExist flag is true then the AcroForm dictionary will be created and added to the document.