[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Collapse]Office File API
  Demo Application
  Redistribution and Deployment
 [Expand]Spreadsheet Document API
 [Expand]Word Processing Document API
 [Collapse]PDF Document API
   Getting Started
   Coordinate Systems
   Document Generation
  [Expand]PDF Graphics
  [Expand]Document Manipulation
  [Expand]Additional Content
  [Collapse]Interactive Forms
    Interactive Form Filling
    Interactive Form Flattening
    Creating Interactive Form
    Deleting Interactive Form
    Export and Import Interactive Form Data
  [Expand]Text Markup Annotations
  [Expand]Document Security
 [Expand]Excel Export Library
 [Expand]Snap Report API
 [Expand]Zip Compression and Archive API
 [Expand]Barcode Generation API
 [Expand]Unit Conversion API
 [Expand]API Reference
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Creating Interactive Form

This topic describes how to create interactive form fields and add them to an existing PDF document.


To learn how to create interactive form fields, see the Adding Interactive Form Fields topic.

Before adding interactive form fields to a PDF document, create an instance of the PdfDocumentProcessor class and load a PDF document into the PDF Document API component using one of the overloaded PdfDocumentProcessor.LoadDocument methods.

An instance of the PdfAcroFormField object represents the interactive form field.

To create an interactive form field, do one of the following:

Then, specify the interactive form field properties. For example, specify the text box text, and type using PdfAcroFormTextBoxField.Text, and PdfAcroFormTextBoxField.Type properties, respectively.

To specify the text box name, tooltip and appearance settings, use the PdfAcroFormField.Name, PdfAcroFormField.ToolTip, and PdfAcroFormVisualField.Appearance properties.


Form field names must be unique in an interactive form.

To find a collision in the interactive form field names, call one of the overloaded PdfDocumentProcessor.CheckFormFieldNameCollisions methods and pass interactive form fields that should be checked as a parameter. These methods return a collection of PdfAcroFormFieldNameCollision objects that contains information about a collision found in interactive form field names.

To obtain the interactive form field in which a collision was found with a field name, use the PdfAcroFormFieldNameCollision.Field property.

You can also get the forbidden field names using the PdfAcroFormFieldNameCollision.ForbiddenNames property.

To add interactive form fields to a document, pass a collection of form fields (for example, PdfAcroFormTextBoxField objects) as a parameter to one of the overloaded PdfDocumentProcessor.AddFormFields methods.

To save a document, call one of the overloaded PdfDocumentProcessor.SaveDocument methods.


This example shows how to create interactive form fields (e.g., text box and radio button group fields) and add them to a document.

Expanded See Also

Is this topic helpful?​​​​​​​