Import XFDF from Databases and Fill PDF Forms in C#

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 database, save the XFDF information from the database as a Stream object, and then use the ImportXFDFDataFromStream method with the following required parameters:

  • Stream — The Stream object containing XFDF information.

  • 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 a Stream object containing XFDF information:

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.ImportXFDFDataFromStream(XFDFStream, true, true);
Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
    gdpicturePDF.ImportXFDFDataFromStream(XFDFStream, True, True)
End Using
Used Methods

Related Topics