XFA Specification
Chapter 2, Template Features for Designing Static Forms
Basic Layout
64
Regardless of the type of alignment being performed, if a single word is too wide to fit into the region the
layout processor must break the word between characters. Furthermore, if a single character or embedded
non-text object by itself is too wide to fit into the region it is allowed to extend beyond the region. In this
case, if the vertical alignment is
center
or
right
, the layout processor may sacrifice vertical alignment in
order to avoid assigning negative coordinates to the character or embedded object.
Influence of hAlign on alignment of text
hAlign
left
right
center
Description
If
hAlign
is set to
left
the line is positioned
so that its left-most text layout unit abuts the
left edge of the region. If
hAlign
is set to
right
the line is positioned so that the
right-most text layout unit abuts the right edge
of the region. If
hAlign
is set to
center
the
line is positioned so that the middle of the line
is at the middle of the region. The figure at right
shows an example of justification with the
hAlign
attribute set to
left
.
For these values the effect is the same
regardless of the flow direction.
Illustrated Effect
To be, or not to be: that is
the question:
Whether 'tis nobler in the
mind to suffer
The slings and arrows of
outrageous fortune,
Or to take arms against a
sea of troubles,
And by opposing end
them?
contentArea
draw
justifyAll
For each line, instead of incorporating the
supplied white space characters, blank regions
are inserted between layout units, one per
breaking whitespace character in the original
text, sized, until the line fills the region from left
to right. The effect is the same regardless of the
flow direction.
draw
There are 4 spaces after this
only
2
after
this
contentArea
word but
word.
In the example at right the template contained
the following declarations:
<draw …>
<text>There are 4 spaces after this
word but only 2 after this
word.</text>
</draw>