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.: <subform>).
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.
Latest posts by suda (see all)
- PDF XFA File Processing – Handling Arc elements - February 25, 2014
- The Definitive list – Run-Deploy-Stop all the major Java Application Servers - February 4, 2014
- Choosing a Java Application Server - January 30, 2014
- Understanding XFA Features – XFA Borders - December 10, 2013
- How to draw PDF XFA Forms accurately (in your viewer) - November 19, 2013