• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class FormFieldCollection

A collection of interactive form fields. Add fields using the various Add* methods and access existing fields by name via the indexer.

Inheritance
object
FormFieldCollection
Implements
IEnumerable<FormField>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Pdf.Forms
Assembly: DRIT.Pdf.dll
Syntax
public sealed class FormFieldCollection : IEnumerable<FormField>, IEnumerable

Properties

this[string]

Get a field by its Name. For radio button groups, returns the first button in the group (whose Value delegates to the group's selected value).

Declaration
public FormField? this[string name] { get; }
Parameters
Type Name Description
string name
Property Value
Type Description
FormField

NewRadioButtonName

The group name to use for the next call to AddRadioButton(Page, double, double, double, double). Must be set before each group of radio buttons.

Declaration
public string? NewRadioButtonName { get; set; }
Property Value
Type Description
string

SignatureFields

Digital signature fields in this form.

Declaration
public IReadOnlyList<SignatureField> SignatureFields { get; }
Property Value
Type Description
IReadOnlyList<SignatureField>

Methods

AddButton(Page, double, double, double, double)

Add a push button to page.

Declaration
public ButtonField AddButton(Page page, double x, double y, double width, double height)
Parameters
Type Name Description
Page page
double x
double y
double width
double height
Returns
Type Description
ButtonField

AddCheckBox(Page, double, double, double, double)

Add a check box to page.

Declaration
public CheckBoxField AddCheckBox(Page page, double x, double y, double width, double height)
Parameters
Type Name Description
Page page
double x
double y
double width
double height
Returns
Type Description
CheckBoxField

AddDropdown(Page, double, double, double, double)

Add a combo box (drop-down) to page.

Declaration
public DropdownField AddDropdown(Page page, double x, double y, double width, double height)
Parameters
Type Name Description
Page page
double x
double y
double width
double height
Returns
Type Description
DropdownField

AddListBox(Page, double, double, double, double)

Add a list box to page.

Declaration
public ListBoxField AddListBox(Page page, double x, double y, double width, double height)
Parameters
Type Name Description
Page page
double x
double y
double width
double height
Returns
Type Description
ListBoxField

AddRadioButton(Page, double, double, double, double)

Add a radio button to page belonging to the group named NewRadioButtonName. That property must be set before calling this method.

Declaration
public RadioButtonField AddRadioButton(Page page, double x, double y, double width, double height)
Parameters
Type Name Description
Page page
double x
double y
double width
double height
Returns
Type Description
RadioButtonField

AddSignature()

Add an invisible digital signature field to the document.

Declaration
public SignatureField AddSignature()
Returns
Type Description
SignatureField

AddSignature(Page, double, double, double, double)

Add a visible digital signature field to page.

Declaration
public SignatureField AddSignature(Page page, double x, double y, double width, double height)
Parameters
Type Name Description
Page page
double x
double y
double width
double height
Returns
Type Description
SignatureField

AddText(Page, double, double, double, double)

Add a single-line (or multi-line) text entry field to page.

Declaration
public TextField AddText(Page page, double x, double y, double width, double height)
Parameters
Type Name Description
Page page
double x
double y
double width
double height
Returns
Type Description
TextField

AddToggle(Page, double, double, double, double)

Add an on/off toggle button to page.

Declaration
public ToggleButtonField AddToggle(Page page, double x, double y, double width, double height)
Parameters
Type Name Description
Page page
double x
double y
double width
double height
Returns
Type Description
ToggleButtonField

Clear()

Remove all form fields from the document (used when flattening).

Declaration
public void Clear()

GetEnumerator()

Enumerate all fields: regular fields first, then individual radio buttons (one per button widget, not per group).

Declaration
public IEnumerator<FormField> GetEnumerator()
Returns
Type Description
IEnumerator<FormField>

GetSignature(string)

Get a signature field by name.

Declaration
public SignatureField? GetSignature(string name)
Parameters
Type Name Description
string name
Returns
Type Description
SignatureField

Remove(FormField)

Remove a non-signature form field.

Declaration
public bool Remove(FormField field)
Parameters
Type Name Description
FormField field
Returns
Type Description
bool

Remove(SignatureField)

Remove a digital signature field.

Declaration
public bool Remove(SignatureField field)
Parameters
Type Name Description
SignatureField field
Returns
Type Description
bool

Implements

IEnumerable<T>
IEnumerable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX