Class PdfForm
A collection of the user-editable form fields within a PDF document
Inheritance
Namespace: IronPdf.Forms
Assembly: IronPdf.dll
Syntax
public class PdfForm : Object
Properties
FieldNames
Retrieve a new copy of the list of form fields names contained within a PDF document
Declaration
public string[] FieldNames { get; }
Property Value
Type | Description |
---|---|
System.String[] |
Remarks
Modifying this list will not affect the PDF document
Fields
Retrieve a new copy of the list of form fields contained within a PDF document
Declaration
public List<FormField> Fields { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<FormField> |
Remarks
Generates a snapshot of the form fields currently within the PDF document. Modifying properties of form fields will immediately update the document. Adding or removing from this list will not add or remove fields from the document.
Methods
GetFieldByName(String)
Returns a FormField by its name. This method is fault tolerant and will attempt to match case mistakes and partial field names.
Declaration
public FormField GetFieldByName(string FieldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | FieldName | The name of the field to be edited. This is analogous to the HTML input 'name' attribute when creating a PDF with forms from HTML using IronPDF. |
Returns
Type | Description |
---|---|
FormField | A FormField object |
RenameField(String, String)
Rename a FormField
Declaration
public string RenameField(string CurrentFieldName, string NewFieldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | CurrentFieldName | Current fully qualified field name |
System.String | NewFieldName | New partial field name |
Returns
Type | Description |
---|---|
System.String | New fully-qualified field name |
Remarks
Please use a fully qualified field name for CurrentFieldName, and a partial field name for NewFieldName