Simple Java program to export PDF form field data in FDF format using Qoppa’s library jPDFFields. jPDFFields is also able to export data in XFDF and XDP formats, you can simply switch the export method to use the appropriate output format.

// Load the document
PDFFields pdfDoc = new PDFFields ("input.pdf", null);
 
// Export field data in FDF format
pdfDoc.exportAsFDF("output.fdf");

Download Full Java Sample Code.