Working with Forms - facades

Flatten all Fields in existing PDF File (facades)

flattenAllFields(..) method of Form class allows you to flatten all the fields of the PDF form. You first need to create Form object, bind source PDF file and then call the flattenAllFields(…) method and finally save the updated PDF using save(..) method.

The following code snippet shows you how to flatten all the fields of the PDF file.

Export Data to XML from a PDF File (Facades)

Form class allows you to export data to an XML file from the PDF file using exportXml method. In order to export data to XML, you need to create an object of Form class, open source PDF form using bindPDF mehtod and then call the exportXml method using the OutputStream object. Finally, you can close OutputStream object and dispose Form object. The following code snippet shows you how to export data to XML file.

Export Data to FDF from a PDF File (facades)

Form class allows you to export data to an FDF file from the PDF file using exportFdf method. In order to export data to FDF, you need to create an object of Form class and open the PDF using bindPDF method, then call the exportFdf method using the OutputStream object. Finally, you can close the stream and PDF document. The following code snippet shows you how to export data to FDF file.