Site iconJava PDF Blog

What are PDF Forms?

pdf logo

Have you ever seen a PDF file with interactive buttons, checkboxes, text, or radio buttons? These interactive elements are PDF forms….

You can see some more example forms on our FormVu sales page.

This is one of my favourite features on the PDF file format because it makes the documents interactive and much more useful. This makes them very useful for collecting data, placing orders and creating invoices. People have even written games using them! This data can be saved as part of the document or submitted to a server.

There are 2 types of PDF Form

There are 2 types of PDF form based on 2 different technologies – AcroForms and XFA. They are very different technically and most PDF libraries do not support XFA.

1. The AcroForms dates back to the beginning of time. It stores data in standard COS object format.

2. An alternative XML based format called XFA (XML Forms Architecture). There is also a legacy mode in which both AcroForms and XFA versions are present in a Document.

AcroForms was the original format and is well supported. XFA is the newer format which has now been deprecated and removed from the PDF file format. It is not as well supported as AcroForms. You need to use Adobe LiveCycle to process them (Itext and our FormVu converter can also handle them).

Although each has its own specification, they both have things like borders, colors etc as you would expect. They also have actions defined within each. PDF forms can also include JavaScript to do calculations – for example adding 2 values together and filling in a total field.