This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/forms/fill-form-fields/import-from-xfdf.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Import XFDF data into PDF forms | Nutrient .NET SDK

An XML Forms Data Format (XFDF) file stores data from forms located in PDF documents. It contains the values of the form fields and can also contain annotations.

Download sample

To import the form data from a file, use the ImportXFDFDataFromFile method with the following required parameters:

  • FilePath — The file path of the XFDF file.
  • ImportFormFields — A Boolean value that specifies whether to import the form field data.
  • ImportAnnotations — A Boolean value that specifies whether to import the annotation data.

The example below imports form field values into a PDF form from an XFDF file:

Register the SDK license before running SDK operations. For setup details, refer to the getting started with .NET SDK guide.

using GdPicture14;
LicenseManager license = new LicenseManager();
license.RegisterKEY("");
using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"input_forms.pdf");
gdpicturePDF.ImportXFDFDataFromFile(@"input_forms.xfdf", true, true);
gdpicturePDF.SaveToFile(@"output.pdf");