# Creating AcroForms

> Create AcroForm fields in WPF from form fields, the ribbon Form Fields tab or Word forms, with DescriptiveText tooltips, and verify them with GetAcroFormFields.

- **Product:** TX Text Control .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for WPF > PDF Processing > PDF Forms > Creating AcroForms
- **2677 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/acroforms/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/acroforms/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/acroforms/llms-full.txt

---

A fillable PDF form is a set of AcroForm fields, the interactive form fields of the PDF format, on top of the page. In a WPF application, you don't build these fields yourself: TX Text Control turns the form fields of the document in the `TextControl` into AcroForm fields when it saves the document as PDF. The sections below show how each form field type ends up in the PDF, how a Word form becomes a fillable PDF and how to check what a PDF reader will see.

The tutorial [Create a PDF Form](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/pdf/form/llms-full.txt) inserts a text box, a drop-down list and a check box and saves them as a PDF form. Inserting form fields in the editor is covered in [Form Fields and Conditional Instructions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/document-editor/form-fields/llms-full.txt), and the form field classes in [Forms and Conditional Instructions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/document-processing/form-fields/llms-full.txt). Form fields require the Enterprise edition.

### What AcroForms Are

AcroForms are the common standard for interactive PDF forms. Their fields are text fields, check boxes, radio buttons, push buttons and choice fields such as drop-down lists, each with a name that identifies its value. TX Text Control handles them in both directions:

- **Creating.** Since version 28.0, form fields become PDF form fields when a document is saved as PDF. Nothing has to be switched on.
- **Reading.** Since version 29.0, `Forms.GetAcroFormFields` returns the fields of a PDF document and their values, as [Reading Form Fields and Values](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/reading-fields/llms-full.txt) describes.

### How Form Fields Become PDF Fields

The [Name](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfield/name-property/llms-full.txt) of a form field becomes the name of its PDF field:

| Form field in the document | Field in the PDF |
|---|---|
| [TextFormField](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textformfield/llms-full.txt) | Text field |
| [CheckFormField](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/checkformfield/llms-full.txt) | Check box |
| [SelectionFormField](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/selectionformfield/llms-full.txt) | Choice field: a drop-down list, or a combo box when users may type their own value |
| [DateFormField](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/dateformfield/llms-full.txt) | Text field with the date as the form displays it |

TX Text Control has no radio buttons or push buttons of its own, so it doesn't create these PDF fields; it reads them from PDF forms made with other tools. Values set before saving are filled in and can be changed in the PDF reader.

### Design the Form in the Window

In a ribbon window, users design forms with the **Form Fields** tab, the WPF class [RibbonFormFieldsTab](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/ribbonformfieldstab/llms-full.txt). Its buttons insert and edit form fields and manage the conditional instructions that validate them. In the WPF version of the TX Text Control Words sample, a booking form with the tab and the **Conditional Instructions** sidebar looks like this:

![The Form Fields tab of the WPF ribbon in TX Text Control Words, with a booking request form of date, number and drop-down form fields and the Conditional Instructions sidebar.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/conditional-instr-sidebar.e7bf0dc0.webp)

The tab is declared in XAML and connected to the `TextControl` through its [RibbonFormFieldsTab](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/ribbonformfieldstab-property/llms-full.txt) attribute, as [Insert Form Fields With the Ribbon](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/pdf/form/#insert-form-fields-with-the-ribbon) shows. Saved with `StreamType.AdobePDF`, the document becomes a fillable PDF form.

### Turn a Word Form Into a Fillable PDF

Legacy form fields and content controls of a Microsoft Word document become form fields when the document is loaded, and AcroForm fields when it is saved as PDF. The following handler in *MainWindow.xaml.cs* loads *registration.docx* into `textControl1`, adds a description to every field that has none and saves the fillable PDF:

```csharp
private void ConvertWordFormButton_Click(object sender, RoutedEventArgs e)
{
    LoadSettings loadSettings = new LoadSettings()
    {
        // Content controls and legacy form fields become form fields
        ApplicationFieldFormat = ApplicationFieldFormat.MSWordTXFormFields
    };

    textControl1.Load("registration.docx", StreamType.WordprocessingML, loadSettings);

    // A tooltip in the PDF reader for every field without a description
    foreach (FormField formField in textControl1.FormFields)
    {
        if (string.IsNullOrEmpty(formField.DescriptiveText))
        {
            formField.DescriptiveText = "Enter " + formField.Name;
        }
    }

    textControl1.Save("registration.pdf", StreamType.AdobePDF);
}
```

The code works as follows:

- With [LoadSettings.ApplicationFieldFormat](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/loadsettings/applicationfieldformat-property/llms-full.txt) `MSWordTXFormFields`, form fields of the Word document become TX Text Control form fields and the other Word fields, such as merge fields, application fields. The default value `None` imports form fields as form fields, too, but no other Word fields.
- [FormFields](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/formfields-property/llms-full.txt) of the WPF `TextControl` contains all form fields of the document.
- [FormField.DescriptiveText](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfield/descriptivetext-property/llms-full.txt), new in version 34.0, describes a field for screen readers, and PDF readers such as Adobe Acrobat Reader show it as the tooltip of the field.

Pointing at a field in Acrobat Reader shows its description:

![A PDF form in Adobe Acrobat Reader with an empty text field for the authorized individual name and the tooltip "Please add the authorized individual name" below it.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/pdf-form-field-tooltip.edd2827b.webp)

The blog article [Designing the Perfect PDF Form with TX Text Control in .NET C#](https://www.textcontrol.com/blog/2025/12/16/designing-the-perfect-pdf-form-with-tx-text-control-in-dotnet-csharp/) puts form fields in table cells, where they keep their size and position in every PDF reader, and names them after their content, such as `account_owner_name`, so that code can map the values to its data.

### Check the Fields of the Saved Form

What a PDF reader sees can be checked with `Forms.GetAcroFormFields`. The following handler writes the name, type and tooltip of each field of the saved PDF to the **Output** window:

```csharp
private void ListAcroFormFieldsButton_Click(object sender, RoutedEventArgs e)
{
    foreach (AcroForms.FormField field in Forms.GetAcroFormFields("registration.pdf"))
    {
        // Derived classes first: a radio button is a check box, a list box is a combo box
        string kind = field switch
        {
            AcroForms.FormTextField => "text field",
            AcroForms.FormRadioButton => "radio button",
            AcroForms.FormCheckBox => "check box",
            AcroForms.FormListBox => "list box",
            AcroForms.FormComboBox => "combo box",
            AcroForms.FormButton => "push button",
            _ => field.FieldType.ToString()
        };

        Debug.WriteLine($"{field.FieldName}: {kind}, tooltip \"{field.AlternateFieldName}\"");
    }
}
```

These `using` directives go at the top of *MainWindow.xaml.cs*:

```csharp
using System.Diagnostics;
using System.Windows;
using TXTextControl;
using TXTextControl.DocumentServer.PDF;
using AcroForms = TXTextControl.DocumentServer.PDF.AcroForms;
```

The `TXTextControl` namespace has a `FormField` class, too, and the alias `AcroForms` keeps the two apart. [FieldName](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/acroforms-formfield/fieldname-property/llms-full.txt) is the name of the PDF field and [AlternateFieldName](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/acroforms-formfield/alternatefieldname-property/llms-full.txt) its tooltip, which comes from `DescriptiveText`. All classes are described in [Reading Form Fields and Values](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/reading-fields/llms-full.txt).

### Where Users Fill In the Form

- **Adobe Acrobat Reader** and other PDF readers that support form fields.
- **Google Chrome,** which fills in AcroForm fields since version 85 and downloads the PDF with the values.
- **Your WPF application.** The `TextControl` can protect the text and leave only the form fields editable, as [Fill Out the Form in the Editor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/pdf/form/#fill-out-the-form-in-the-editor) shows.

A form saved by TX Text Control, filled in with Chrome:

![A PDF form in Google Chrome with the company name filled in and the drop-down list of countries opened.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/pdf-form-filled-in-chrome.b3b5e03a.webp)

### Forms, Permissions and PDF/A

- **Permissions.** With a master password and [DocumentAccessPermissions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/savesettings/documentaccesspermissions-property/llms-full.txt), readers fill in the form but change nothing else, as [Save a Fillable Form](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/exporting/#save-a-fillable-form) shows.
- **PDF/A.** Encryption isn't allowed in PDF/A, so permissions can't protect a PDF/A form. A filled form can be flattened and then archived as PDF/A, as [Exporting Interactive and Flattened Forms](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/exporting/llms-full.txt) describes.

### Next Steps

- [Reading Form Fields and Values](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/reading-fields/llms-full.txt): read the values of filled PDF forms.
- [Exporting Interactive and Flattened Forms](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/exporting/llms-full.txt): save forms fillable or with fixed values.
- [Forms and Conditional Instructions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/document-processing/form-fields/llms-full.txt): create form fields in code.

---

## Nearby

- **Previous:** [PDF Forms](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/llms-full.txt)
- **Next:** [Reading Form Fields and Values](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/reading-fields/llms-full.txt)
