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.
Latest posts by suda (see all)
- How to read Tiff images in Java - August 13, 2015
- How to generate smaller PNG files in Java - July 1, 2015
- PDF XFA – Sending data as an Email - February 24, 2015
- PDF Coons Shading – find color value of given point - January 27, 2015
- A Beginners guide to PDF Lattice Shading - December 23, 2014