XFA components structure and finding x,y coordinates

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. 

If you’re a first-time reader, or simply want to be notified when we post new articles and updates, you can keep up to date by social media (Twitter, Facebook and Google+) or the  Blog RSS.

The following two tabs change content below.

suda

Java EE developer at IDRSolutions
Suda is the Senior Java EE Developer at IDR Solutions, and specialises in XFA, Fonts, True-Type Fonts, application servers and conversions. He is a keen science-fiction fan in his spare time.

Related Posts:

suda

About suda

Suda is the Senior Java EE Developer at IDR Solutions, and specialises in XFA, Fonts, True-Type Fonts, application servers and conversions. He is a keen science-fiction fan in his spare time.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>