XFA components can be categorized mainly into Field components and non Field components (also known as static objects). Static components could be an image, shape (rectangle, arc, or line) or unmodifiable simple text. Dynamic components can be a button, radio button, check box, choice list, date time field, editable text (simple, numeric, password), or signature. All dynamic components are expected to be placed inside a subform tag (i.e.: ).
The location of a subform may be defined in its x, y attributes or may relate to Content area of Page Area node. If x,y location is defined in both places then the location should be calculated from content area and the calculated values should be added to the subform x.y definition.
A PDF file may contain one page area and multiple number of subforms or multiple page areas and more subforms. If a page contains a single page Area and multiple number of subforms then contained subforms should be treated as seperate pages if particular subform contains “break”, “break after”, “break before” tags. If PDF files contain multiple page areas then break and other tags expect relevant page area node’s id or name to be placed as an attribute with them.
At the same time single page may contain multiple subforms. This is where the complexity arises. Usually XFA form components location is based on the location of subforms if a page contain more subform then nth subform x,y coordinates depends on n-1 subform’s x,y,width and height location providing that nth subform does not contain x,y coordinates.
I thought this information would be useful if you have a plan to implement XFA support into your api or access and manipulate XFA data..
This post is part of our “XFA Articles Index” in these articles, we aim to help you understand XFA.
Find out more about our software for Developers
Convert PDF to HTML5 or SVG
Convert AcroForms and XFA to HTML5
Java PDF SDK for working with PDF files