PDF AcroForms in Android

Adobe Forms are PDF documents containing form fields such as text fields, radio buttons, check boxes and buttons. Sound familiar? This mature yet efficient technology has been out there since 1998, it is tightly integrated into Acrobat and is currently being supported by many third-party software vendors.

PDF AcroForms in Android

XFDF or XFA?

By the way, you may have heard about XFA (XML Forms Architecture), which is another format that can also be used for managing your PDF forms. However, in this post we are not discussing the differences between both formats, XFA and XFDF (AcroForms), but we are focusing on how to create and set AcroForms in Android.

Don’t get overwhelmed by this technical terminology! You’ll see how easy it is to manage your PDF forms with the PlugPDF SDK.

Don’t get overwhelmed by this technical terminology!

Technically speaking XFA and XFDF are significantly different from each other: AcroForms are regular PDF files with some additional elements (the interactive form fields) coded in XML format, while XFA are documents based on the XML Forms Architecture specification.

Export and import XFDF files

So XFDF stands for “XML Forms Data Format”. These are XML files holding annotation descriptions of the values contained in the given PDF document.

Since our SDK provides a simple yet effective API, PDF contents can be easily extracted and inserted into XFDF files. In the Android case, please find the methods exportAnnotToXFDF and importAnnotFromXFDF in the PDFDocument class.

It is easy to manage your PDF forms with the PlugPDF SDK

In order to export data to the SD card, the exportAnnotToXFDF method can be used as it is shown below.

On the other hand, the importAnnotFromXFDF method can be called this way to import data into XFDF format.

From now on, you can set up the same annotation data in any PDF via the XFDF file.

Finally, the file content can be accessed by opening the XFDF file.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *