Import XFDF from Files and Fill PDF Forms in C# .NET

An XML Forms Data Format (XFDF) file stores data from forms located in PDF documents. It contains the form structure and the values submitted to it.

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 a PDF form from an XFDF file:

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.ImportXFDFDataFromFile(@"C:\temp\form.xfdf", true, true);
Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
    gdpicturePDF.ImportXFDFDataFromFile("C:\temp\form.xfdf", True, True)
End Using
Used Methods

Related Topics