Click or drag to resize
Pdf Library for .NET

PdfFormFieldsCollection Class

A read-only-count collection of the AcroForm fields in a loaded document. Index by position or by field name; enumerate to walk every field.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfFormFieldsCollection

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public class PdfFormFieldsCollection : IEnumerable<PdfFormField>, 
	IEnumerable

The PdfFormFieldsCollection type exposes the following members.

Properties
 NameDescription
Public propertyCountGets the number of fields in the form.
Public propertyItemInt32Gets the field at the specified zero-based index.
Public propertyItemStringGets the field with the specified (fully-qualified) name, or null.
Top
Methods
 NameDescription
Public methodGetEnumeratorReturns an enumerator over the fields.
Top
Example
PdfFormManager manager = new PdfFormManager();
manager.Load("form.pdf");
PdfFormFieldsCollection fields = manager.Fields;
for (int i = 0; i < fields.Count; i++)
    System.Console.WriteLine(fields[i].Name);
PdfFormField byName = fields["email"];
See Also