Get Started with Forms Extension: XFA in 10 Minutes

Get Started with Forms Extension: XFA in 10 Minutes

Published February 19, 2026

You Have Your Trial Key. Here Is What to Do Next.

This guide assumes you have requested your Forms Extension trial key from Datalogics and have the Adobe PDF Library (APDFL) already installed or available. If you have not yet requested the trial, do so at Forms Extension.

The goal of this walkthrough is to get you from a trial key to a working XFA form conversion or flattening in under 10 minutes. No marketing. No lengthy setup. Just the steps that matter. Need more info? Check out our Documentation and API Reference sites.

Step 1: Set Up Your Project

Forms Extension is an add-on module for the Adobe PDF Library. Your project needs to reference the Adobe PDF Library SDK and include the Forms Extension license key alongside your base APDFL key.

For .NET projects, you will reference the Datalogics.PDFL NuGet package if you are using the NuGet distribution, or add the DLL references directly if you are working from the downloaded SDK. The Forms Extension license key is typically passed during Library initialization alongside the APDFL key.

Check your Datalogics evaluation email for both keys. If you received only one key, contact evalsupport@datalogics.com and request that Forms Extension be added to your evaluation.

Step 2: Initialize the Library With Forms Extension

The single most important step is initializing the Adobe PDF Library with the Forms Extension flag. Without this, XFA processing capabilities are not available and XFA documents will be handled as standard PDFs, which produces incorrect results.

In C#, the initialization looks like this:

    using (Library lib = new Library(LibraryFlags.InitFormsExtension, "your-apdfl-key", "your-forms-extension-key"))

    {

        // All Forms Extension operations go inside this using block

    }

The LibraryFlags.InitFormsExtension flag tells APDFL to load the Forms Extension rendering engine. From this point forward, the Library instance has full access to XFA rendering, flattening, conversion, and data operations.

Step 3: Load Your XFA Form

Once the library is initialized, loading a form document works the same way as loading any PDF:

    Document doc = new Document("your-xfa-form.pdf");

You can use any static or dynamic XFA form for this step. If you do not have one readily available, the APDFL GitHub repository includes sample XFA forms in the resources directory of the Forms Extension samples folder.

Step 4A: Flatten the Form to Static PDF

Flattening is the most common first operation. It converts all form fields, including their current values and layout, into permanent PDF page content. The resulting document is non-interactive and can be rendered by any PDF viewer without XFA support.

The GitHub sample to reference is the FlattenXFA sample in the DotNETCore/Samples/FormsExtension directory of the apdfl-csharp-dotnet-core repository. That sample demonstrates flattening a dynamic XFA form with a complete working code pattern.

After calling the flatten operation, save the output document:

    doc.Save(SaveFlags.Full, "flattened-output.pdf");

Open the output in any PDF viewer (Chrome, Adobe Reader, Foxit, any viewer) and verify that the form fields have been converted to static content.

Step 4B: Convert XFA to AcroForm

If you want an interactive AcroForm rather than a static flattened PDF, use the XFA-to-AcroForm conversion path instead. The GitHub sample to reference is ConvertXFAToAcroForms in the same FormsExtension samples directory.

After conversion, save as you would any PDF. The output will be an interactive AcroForm that you can open in Chrome, fill out without Acrobat, and validate against PDF/A standards.

Step 4C: Import Form Data

If your workflow involves populating a form with data from an external source, the ImportFormData sample demonstrates loading an FDF or XFDF data file and importing it into the form fields. This is the pattern to use when you need to generate pre-filled forms from a database or CRM.

Step 5: Verify the Output

For a flattened output, open the PDF in Chrome or any non-Acrobat viewer and confirm that the form content is visible and the fields are non-interactive. For an AcroForm conversion output, open in Chrome and confirm that the form fields are present and fillable. For a data import output, verify that the correct values appear in the expected fields.

If the output is blank or incorrect, the most common cause is that Forms Extension was not initialized correctly. Double check that LibraryFlags.InitFormsExtension was included in the Library constructor and that both license keys are present.

GitHub Sample Reference

The complete set of Forms Extension .NET code samples is available in the Datalogics APDFL GitHub repository. The key samples for getting started are:

       ConvertXFAToAcroForms: XFA to AcroForm conversion with full working C# code

       FlattenXFA: Dynamic XFA flattening to static PDF

       ImportFormData: FDF and XFDF data import into form fields

       ExportFormData: Form field data extraction to FDF, XFDF, or XML

Each sample includes a README with the expected input, output, and any configuration steps. The samples are designed to run against the included test resources so you can verify correct output immediately.

Frequently Asked Questions

How do I get started with Forms Extension?

Request a trial key and initialize the Adobe PDF Library with LibraryFlags.InitFormsExtension and your Forms Extension key. Use the GitHub samples to run your first conversion or flattening operation.

How do I initialize Forms Extension in Adobe PDF Library?

Pass LibraryFlags.InitFormsExtension as the first argument to the Library constructor, along with your APDFL key and Forms Extension key. This enables all XFA and AcroForm processing capabilities.

What XFA to AcroForm .NET code example is available?

The ConvertXFAToAcroForms sample in the Datalogics APDFL GitHub repository demonstrates the complete .NET code pattern for converting an XFA form to an interactive AcroForm using Forms Extension.

Need to extend the Forms Extension free trial? Want to talk to an engineer?

Contact evalsupport@datalogics.com if you need additional time or set up a call with an engineer about your proof of concept.. No credit card is required.