XFA Specification
Chapter 2, Template Features for Designing Static Forms
Basic Layout
57
placed in the same container. By default positioned layout is used for all layout objects except for the
words within a block of text. The words and embedded objects within a block of text flow from left to
right or right to left in lines and the lines stack from top to bottom.
For the simple forms described in this chapter it is appropriate to use the default layout strategies. For that
reason this chapter describes the rules for positioned layout. Flowed layout for the special case of text is
described in
“Alignment and Justification” on page 44.
Flowed layout for container objects is described in
“Flowing Layout for Containers” on page 221.
Positioned Layout
When using positioned layout each contained object has a fixed offset vector (an (x,y) pair) which
determines the location of the contained object with respect to its container. By default (and typically) the
vector gives the offset of the contained object's top-left corner from the container's top-left corner. The
offset vector is supplied as properties named
x
and
y
. The
x
property is interpreted as a measurement to
the right and the
y
property as a measurement down from the top-left-corner of the container. The values
of these properties must be
measurements.
If there is no
x
or
y
property for a contained object a value of
0 is assumed by the layout processor. For example, assume a template as follows:
<subform Name="A" layout="position" …>
<!-- root subform -->
<pageSet …>
<pageArea name="X">
<draw name="XBackground" x="1cm" y="20cm" …>
<text …>background text</text>
</draw>
<contentArea name="Y" x="2cm" y="2cm" w="13cm" h="15cm" … />
</pageArea>
</pageSet>
<draw name="ABoilerplate" x="1cm" y="12cm" …>
<text …>boilerplate text</text>
</draw>
<field name="B" x="2cm" y="2cm" …> … </field>
<field name="C" x="2cm" y="7cm" …> … </field>
</subform>