suda Senior Java EE Develope specialises in Pdf forms , Fonts, application servers and Image manipulation, meditates in spare time.

XFA components structure and finding x,y coordinates

1 min read

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. 

IDRsolutions develop a Java PDF Viewer and SDK, an Adobe forms to HTML5 forms converter, a PDF to HTML5 converter and a Java ImageIO replacement. On the blog our team post anything interesting they learn about.

suda Senior Java EE Develope specialises in Pdf forms , Fonts, application servers and Image manipulation, meditates in spare time.

Why we wrote our own Java jpeg2000 libraries

JPEG2000 is an important image file format which offers significant benefits over JPEG. For our specific usage it does generate significantly smaller file sizes...
Mark Stephens
52 sec read

How to choose JPG versus JPEG2000 for image files

Since we started to support both JPG and JPG2000 as image file outputs in our software, we have found that this is a very...
Mark Stephens
1 min read

Leave a Reply

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

IDRsolutions Ltd 2019. All rights reserved.