XFA Specification
Chapter 7, Layout for Growable Objects
Flowing Layout for Containers
233
Splitting a Container Having Child Containers
In addition to the constraints upon
splitting individual objects, the layout
process may be trying to split a contained
object which itself contains a mixture of
other objects. For example, the object to
be split may contain a mixture of blocks of
text and images as shown at right.
In the figure at right, subform
D
cannot
split within its margins, because splitting
within margins is not allowed. It cannot
split within image
E
or image
F
because
images are not splittable. Neither can it
split below the bottom of
contentArea
A
because then the top fragment of
subform
D
would extend outside the
contentArea
. The only places it can
legally split are between the images at
one of the text area's legal split points.
The dotted lines with arrowheads show
the two legal split positions.
Content B
Content C
contentArea A
top
margin
Image E
Image F
To be or
not to be,
that is the
question.
Whether
'tis nobler
in the mind
to bear the
split
split
bottom
margin
Subform D
When the object to be split contains other
objects, the layout processor finds the
most efficient (lowest) split location that is
Splitting a container
acceptable to all of the contained objects.
In other words it finds the optimum
consensus. The optimum consensus may
be found by the following procedure (written as pseudocode):
Start with the current split location set to the desired split location.
While any object in the container cannot split at the current split
location, do the following:
Set the current split location to the lowest permissible split location
for that object that is above the current split location
Thus the split location creeps upward until a location is found that is acceptable to all the contained
objects. This location may be right at the top of the container (Y offset of zero) in which case the object can
not split.
Split consensus is employed when splitting subforms, areas, and exclusion groups.