Class FormFieldCollection
Observable collection of form fields
Inheritance
Implements
Namespace: IronSoftware
Assembly: IronPdf.dll
Syntax
public class FormFieldCollection : ObservableCollection<IFormField>, IFormFieldCollection
Working with Iron Software API in IronPDF runs through FormFieldCollection. It represents observable collection of form fields.
FormFieldCollection matters when an application needs to configure or invoke Iron Software API from C# code. The class encapsulates the related options and behavior in a single object that is set up once and reused across render or processing calls. Typical scenarios include batch generation pipelines, templated document workflows, and integration with existing C# document services.
To use FormFieldCollection, instantiate or obtain it from the relevant entry point in the IronPDF C# API. Key properties include IsReadOnly. Assign options or invoke methods on the instance to configure or perform the operation.
using IronPdf;
// Obtain FormFieldCollection from the relevant entry point in the IronPDF API
void Configure(FormFieldCollection instance)
{
var current = instance.IsReadOnly;
instance.Add();
}For the broader workflow, see the IronPDF C# documentation for related how-to guides and examples. For broader context, the Iron Software API portion of the IronPDF C# API contains related types that work with FormFieldCollection directly. FormFieldCollection instances inherit additional members from ObservableCollection<IFormField> that may be relevant in advanced scenarios. In application code, treat FormFieldCollection as a configured object that is constructed once and reused across operations rather than instantiated per call. Configuration is generally idempotent: assigning the same property value twice has the same effect as assigning it once. For diagnostic purposes, inspect the relevant FormFieldCollection property after each operation to confirm the configured state. See the constructors, properties, and methods tables below for the complete API surface of FormFieldCollection. Application code typically obtains or instantiates a single FormFieldCollection and shares it across multiple IronPDF operations rather than recreating it per call. For multi-threaded scenarios, follow the threading guidance for the relevant IronPDF entry point; FormFieldCollection instances are not assumed to be thread-safe unless documented.
Properties
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
Add(IFormField)
Declaration
public void Add(IFormField item)
Parameters
| Type | Name | Description |
|---|---|---|
| IFormField | item |
Clear()
Declaration
public void Clear()
DisableFormFontFallback()
Suppresses the automatic font fallback embed for non-ASCII form values without registering any replacement font. Zero bytes are added to the document.
Declaration
public void DisableFormFontFallback()
FindFormField(String)
Find a form field with the specified name. First tries to match a fully-qualified name. If a fully-qualified match cannot be found, then partial name matches are tried.
Declaration
public IFormField FindFormField(string Name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | Name | Form field name |
Returns
| Type | Description |
|---|---|
| IFormField | Form field with the specified name |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
Remove(IFormField)
Declaration
public bool Remove(IFormField item)
Parameters
| Type | Name | Description |
|---|---|---|
| IFormField | item |
Returns
| Type | Description |
|---|---|
| System.Boolean |
RemoveAt(Int32)
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index |
SetFormFont(String, Byte[], Boolean)
Sets the document-wide font for subsequent form field fills on this document. When set, the engine skips the automatic font fallback embed for form values that contain non-ASCII characters.
Declaration
public void SetFormFont(string fontName, byte[] fontData, bool forceEmbed = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fontName | PDF font name as it appears in the document's /DR /Font dictionary |
| System.Byte[] | fontData | Raw TrueType/OpenType bytes; pass null or empty for name-only mode (the font must already be embedded in the document) |
| System.Boolean | forceEmbed | When true, embed |