

Filling the form is as easy as injecting your XML into the data tag.ĪcroForms are always static. XFA forms are typically created using Adobe LiveCycle Designer in which you import your own XSD as a data source, and then you can start designing your form. One of the major benefits of XFA, is that the data consists of XML that uses whichever schema you want. The datasets part consists of the dataDescription, which resembles XSD, and the data. In the template, specific syntax is used to define what the form should look like (how it has to be rendered by Adobe Reader). The embedded XML consists of different parts of which the template and the datasets are the most important. In this case, the PDF acts as a container for an XML stream. It might also be interesting to take a look at the XML Forms Architecture (XFA). The servlet that receives your request will return the stream that was sent to the server by Adobe Reader. Fill out the form and choose the XFDF button. This could be ideal if you want to store people's responses on a server in the form of XML. It's the XML version of the Forms Data Format (FDF). The only link with XML is that you can import/export such a form in the XFDF format, which is a spec that is referred to in ISO-32000-1. I have described how to create such a form using Open Office in chapter 6 of my book (see section 6.3.5). Suppose that you need more lines, you won't be able to fit them all into the form. Suppose that you need less lines, you'll have a number of unused fields that will remain visible. If you have a form representing an invoice, then such a form could provide 20 invoice lines. In AcroForm-based forms, the form is described using PDF syntax, and every field has fixed coordinates.

There are two "flavors" of forms in PDF: AcroForm-based and XFA forms. I'm not affiliated with Adobe, Open Office, etc. I'm a member of the NBN, which is the Belgian Office for Standards (including ISO-32000 and related PDF standards). Addendum (see comment): I'm the CEO of the iText Software Group, the original developer of iText (an open source PDF library), and the author of two 'iText in Action' books published by Manning.
