XFA Specification
Chapter 2, Template Features for Designing Static Forms
Basic Layout
59
The template may specify offset vectors that cause contained
objects to be placed partly or entirely beyond the right or bottom
limits of their containers, or to overlap each other. It is not the layout
processor's job to second-guess the offset vectors. However, this is
no guarantee that overlapped objects will render properly on all
output devices. No objects may include
x
or
y
values that are
negative or that resolve to negative numbers after conversion from
the given anchor point to the top-left corner. In other words, the
nominal extents of objects must not extend beyond the top and left
limits of their containers. The figure at right shows an example of
permitted practice, in which the container's size is fixed and the
objects contained within it both overlap each other and extend
beyond the nominal extent of the container, but in an allowed
direction.
The layout processor employs positioned layout within any
area
,
pageArea
, or
contentArea
object. It also employs positioned
layout within any
draw
object containing an arc, line, or rectangle.
And, it employs positioned layout within any subform that has no
layout attribute or has a layout property with the value of
positioned
. Exclusion groups are transparent to layout strategy,
that is, they inherit their layout strategies from their parents.
Content B
contentArea
A
Content D
Content E
Content C
Positioned layout
Forbidden Condition: Negative Coordinates
The
x
and
y
properties of an object, its anchor point, and its width and height, must not conspire to result
in all or part of the object's nominal extent being above or to the left of its container. The result is
unspecified. The layout processor may make a best effort to deal with the resulting negative coordinates,
but even if it copes that does not guarantee that the renderer will be able to.
Clipping
When a container has a fixed size, the content does not fit into the container, and the layout strategy is
positioned, the excess content may either extend beyond the region of the container or be clipped. The
permissible range of actions varies according to the type of container and the context (interactive or
non-interactive).
When the container is a field and the context is interactive, the content of the field may be clipped.
However some means must be provided to access the entire content. For example, the XFA application
might arrange that when a field gains focus a widget pops up. The widget could be dynamically sized or it
could support scrolling.
When the container is a field and the context is non-interactive (for example printing to paper) the content
must not be clipped. The content may be allowed to extend beyond the field or it may be shrunk to fit the
field.
When the container is a draw, in any context, the behavior is implementation-defined. It is the
responsibility of the form creator to ensure that the region is big enough to hold the content.
Note that clipping does not have to be done by the layout processor. If it is done at all it can be done
downstream in the renderer. However it may be advantageous to do partial clipping at the layout stage.
For example, when justifying it is more efficient to stop adding text after the last line that is wholly or
partly inside the content region.
Home Index Bookmark Pages
Pages: Home Index All Pages