Q: For interactive PDF forms that I have entered data to is there a way to save the PDF to the file system from Qoppa’s PDF viewing component jPDFViewer? I don’t see a save or save as button in the demo viewer.

A: jPDFViewer allows to fill in form fields data and export the data then import it back. But it does not let you save the filled PDF form.

Export Form Data in FDF, XFDF format
Form data that has been typed into form fields can be exported in format FDF, or XFDF using the following code:

// create the PDF viewer bean
PDFViewerBean bean = new PDFViewerBean ();
 
// load a PDF document
bean.loadPDF ("c:\\test.pdf");
 
// export annotations as an XFDF file (can also export to output stream)
bean.getDocument().getAcroform().exportAsXFDF("c:\\fields.xfdf");
 
// export annotations as an  FDF file (can also export to output stream)
bean.getDocument().getAcroform().exportAsFDF("c:\\fields.xfdf");

Import Form Data from FDF, XFDF format
To import form data back into a PDF document, use the following code:

// import annotations from XFDF from a file (can also read from input stream)
bean.getDocument().getAcroform().importXFDF("c:\\fields.xfdf");
 
// import annotations from FDF from a file (can also read from input stream)
bean.getDocument().getAcroform().importXFDF("c:\\fields.xfdf");

Try it!
You can test this functionality in Qoppa’s jPDFViewer Sample Application downloadable from this link

Download jPDFViewer Sample Demo Application

Look under the top menu under Forms.

Look under the Forms Menu Entry in jPDFViewer Sample Demo App for options to export and import form field data
Look under the Forms Menu Entry in jPDFViewer Sample Demo App for options to export and import form field data

How can I save the Filled PDF Form?
If you need to save the data within the PDF form, you will need to use our other PDF component called jPDFNotes which can saved filled PDF forms as well as annotate and digitally sign PDFs.