Skip to main content
A newer version of this page is available. .

How to: Import Interactive Form Data from XML

Important

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use these examples in production code. Refer to the DevExpress Subscription page for pricing information.

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

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

using DevExpress.Pdf;

namespace ImportInteractiveForms {
    class Program {
        static void Main(string[] args) {

            using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {

                // Load a PDF document with AcroForm data.
                processor.LoadDocument("..\\..\\EmptyForm.pdf");

                // Import AcroForm data from an XML file.
                processor.Import("..\\..\\InteractiveForm.xml");

                // Save the imported document.
                processor.SaveDocument("..\\..\\InteractiveForm.pdf");
            }
        }
    }
}
See Also