Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Collapse]PDF Viewer
   [Expand]Getting Started
   [Collapse]Interactive Forms
     Interactive Form Filling
     Export and Import of Interactive Form Data
   [Expand]Navigation
   [Expand]Interactivity
    Deployment
   [Expand]Examples
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[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
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Export and Import of Interactive Form Data

This document describes how to export and import AcroForm data (interactive forms that contain PDF fields for gathering information interactively from a user) in various formats - FDF, XFDF, XML, and TXT.

Expanded Prerequisite

Before exporting/importing AcroForm data, make sure you performed the following prerequisite actions:

  • Add the PDF Viewer to a WinForms application. To learn more, see How to: Add a PDF Viewer at Design Time and How to: Add a PDF Viewer via Code tutorials.
  • Load a document that contains interactive forms. See the Lesson 2 - Loading a Document tutorial.
    Note

    If a PDF document does not contain an interactive form, then the Interactive Form tab does not appear in the ribbon.

    In this tutorial, the FormDemo.pdf with interactive forms is used. To access this document, copy the file to your project subdirectory. This file is located in the following folder by default:

    C:\Users\Public\Documents\DevExpress Demos 17.2\Components\Data\FormDemo.pdf

Expanded Export/Import using the PDF Viewer's toolbar

The PDF Viewer's toolbar creation is detailed in the corresponding section of Lesson 1 - Creating a PDF Viewer.

Export

To export interactive form data from a PDF document to supported formats:

  • Click the Export button on the PDF Viewer's toolbar (you can find this button in the Interactive Form tab of the Ribbon toolbar).

    The Save As dialog appears.

    In this dialog, specify a file name and the format in which interactive form data should be exported (FDF, XFDF, XML or TXT). To save the document, click Save as shown above.

Import

To import interactive form data from FDF, XFDF, XML or TXT to a PDF document:

  • Click the Import button on the PDF toolbar (you can find this button in the Interactive Form tab of the Ribbon toolbar).

  • This invokes the Open dialog box, where you can select a file with interactive forms (for example, in FDF) to import data. To perform the import, click Open.

  • The imported interactive form data shows in a PDF document.

Expanded Export/Import via extension methods

You can access extension methods by adding the DevExpress.Docs reference to your application.

Important

The Universal Subscription or an additional Document Server Subscription is required to use extension methods in production code. Please refer to the DevExpress Subscription page for pricing information.

To export interactive form data from a PDF document to one of the supported formats, call one of the PdfViewerExtensions.Export overloaded methods with the specified data format settings.

To import AcroForm data, call one of the PdfViewerExtensions.Import overloaded methods with data format settings or without them.

The PdfFormDataFormat enumeration lists the supported data formats.

Examples

The following examples show how to export and import interactive form data:

Expanded See Also

How would you rate this topic?​​​​​​​