Table of Contents

Class PdfFormCreator

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

Creator which shall be used in order to create all form related instances.

public sealed class PdfFormCreator
Inheritance
PdfFormCreator
Inherited Members

Remarks

Creator which shall be used in order to create all form related instances. By default PdfFormFactory is used.

Methods

CreateButtonFormField(PdfWidgetAnnotation, PdfDocument)

Creates a button form field as a parent of a PdfWidgetAnnotation using provided factory.

public static 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 using provided factory.

public static 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 using provided factory. This PdfDictionary must be an indirect object.

CreateButtonFormField(PdfDocument)

Create a minimal, empty PdfButtonFormField using provided factory.

public static 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 using provided factory.

public static 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 using provided factory.

public static 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 using provided factory. This PdfDictionary must be an indirect object.

CreateChoiceFormField(PdfDocument)

Create a minimal, empty PdfChoiceFormField using provided factory.

public static 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 using provided factory.

public static 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 using provided factory.

public static 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 using provided factory. This PdfDictionary must be an indirect object.

CreateFormField(PdfWidgetAnnotation, PdfDocument)

Creates a form field as a parent of a PdfWidgetAnnotation using provided factory.

public static 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 using provided factory.

public static 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 using provided factory. This PdfDictionary must be an indirect object.

CreateFormField(PdfDocument)

Create a minimal, empty PdfFormField using provided factory.

public static 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 using provided factory.

public static 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 using provided factory.

public static 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 using provided factory. This PdfDictionary must be an indirect object.

CreateSignatureFormField(PdfDocument)

Create a minimal, empty PdfSignatureFormField using provided factory.

public static 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 using provided factory.

public static 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 using provided factory.

public static 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 using provided factory. This PdfDictionary must be an indirect object.

CreateTextFormField(PdfDocument)

Create a minimal, empty PdfTextFormField using provided factory.

public static PdfTextFormField CreateTextFormField(PdfDocument document)

Parameters

document PdfDocument

The PdfDocument instance.

Returns

PdfTextFormField

created PdfTextFormField

GetAcroForm(PdfDocument, bool)

Retrieves AcroForm from the document using provided factory.

public static 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 using provided factory. 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.

SetFactory(PdfFormFactory)

Set PdfFormFactory to be used for form related instances creation.

public static void SetFactory(PdfFormFactory factory)

Parameters

factory PdfFormFactory

PdfFormFactory to set