[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Collapse]PDF Viewer
   [Expand]Getting Started
   [Expand]Navigation
   [Collapse]Access and Edit Document Content
    [Collapse]Interactive Form
      Interactive Form Filling
      Export and Import of Interactive Form Data
     File Attachment
     Text Markup Annotations
     Content Copying
     Printing
   [Expand]Interactivity
   [Expand]Examples
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Interactive Form Filling

This document describes how to fill a document with interactive forms and provides customization options.

Expanded Overview

You are able to type directly into PDF documents that contain the form field information.

As you can see from the image above, each field is rendered according to its form type, providing text boxes, radio buttons and combo boxes with auto complete, check boxes and lists.

The image below shows the auto complete, combo box and check box features embedded in an address form.

Expanded Customization

Highlight Form Field

The PDF Viewer can highlight interactive form fields with a color. To enable this functionality, set the PdfViewerControl.HighlightFormFields property to true.

If you wish to change the default color, which is used to highlight form fields, use the PdfViewerControl.HighlightedFormFieldColor property.

The image below demonstrates the PdfViewerControl.HighlightedFormFieldColor property set to Color.FromArgb(120, 255, 0, 0).

Change Form Field Value

To specify a new value of the form field, use the FormFieldValueChangingEventArgs.NewValue property when the PdfViewerControl.FormFieldValueChanging event is handled.

After a form field value is changed, the PdfViewerControl.FormFieldValueChanged event is raised. The FormFieldValueChangedEventArgs.FieldName, FormFieldValueChangedEventArgs.OldValue and FormFieldValueChangedEventArgs.NewValue properties allow you to obtain the field name, the field's previous value and new value.

When a form field receives the input focus, the form field's editor is activated and the PDF Viewer raises the PdfViewerControl.ShowingEditor event. In this event, you can prevent end-users from showing the form field's editor using the PdfShowingEditorEventArgs.Cancel property. When this property is enabled, end-users can't edit the form field value.

After the form field's editor has been shown the PdfViewerControl.ShownEditor event is raised. When the form field loses the input focus the PDF Viewer raises the PdfViewerControl.HiddenEditor event.

You can obtain a form field name using the PdfEditorEventArgsBase.FieldName property when the PDF Viewer raises the PdfViewerControl.ShowingEditor, PdfViewerControl.ShownEditor or PdfViewerControl.HiddenEditor event.

Expanded See Also

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