Skip to main content

How to: Import AcroForm Data from XML

  • 2 minutes to read


The Universal Subscription or an additional Office File API Subscription is required to use this example in production code. Refer to the DevExpress Subscription page for pricing information.

This example demonstrates how to import AcroForm data (interactive form data) from XML format to a PDF document.

You can also import the AcroForm data from FDF, XFDF, and TXT formats, as described below.

To import interactive forms from XML format:

  • load an interactive forms document (e.g., from a file path), in which the data will be imported, into the PDF Viewer using the PdfViewer.LoadDocument method;
  • call one of the PdfViewerExtensions.Import overloaded methods, for example, with a specified XML file that contains imported data.


You may need to add the DevExpress.Docs reference to your application to access the PdfViewer.Import extension methods.

View Example

using System.Windows.Forms;
using DevExpress.Pdf;

namespace ImportAcroForm {
    public partial class Form1 : Form {
        public Form1() {

            // Load a PDF document with AcroForm data.

            // Import the document from an XML format. 

            // Save the imported document.