TX Text Control .NET for Windows Forms

GetAcroFormFields Method

Method|Introduced in 29.0
Namespace
TXTextControl.DocumentServer.PDF
Package
TXTextControl.TextControl.WinForms.SDK as TXDocumentServer.dll from the private NuGet feed or Text Control Offline Packages

Description

Imports AcroFormFields from an Adobe PDF document.

Syntax

GetAcroFormFields(string)

Return the imported AcroFormField objects from a file.

public static FormField[] GetAcroFormFields(string filename);
ParameterDescription
filename

Specifies the complete file path of the PDF document.

GetAcroFormFields(byte[])

Return the imported AcroFormField objects from a byte array.

public static FormField[] GetAcroFormFields(byte[] data);
ParameterDescription
data

Specifies the byte array of the PDF document.

Return Value

Returns an array of FormField objects.

Examples

The following example retrieves acro form fields from the forms.

TXTextControl.DocumentServer.PDF.AcroForms.FormField[] results = TXTextControl.DocumentServer.PDF.Forms.GetAcroFormFields("document.docx");
foreach (TXTextControl.DocumentServer.PDF.AcroForms.FormField formField in results)
{
    Console.WriteLine(formField);
}