XFA Specification
Chapter 2, Template Features for Designing Static Forms
Basic Composition
33
Values
All measurements have a quantity or value, which is expressed in a particular unit that may either be
explicitly stated or implied. Common uses of measurements include the description of a length or width of
an element, the position of an element, or an offset from a coordinate.
The format of a measurement is a value, consisting of the following parts:
An optional sign character — one of "+" (the default) or "-"
A number — a number with optional fractional digits
An optional unit identifier
The following are examples of measurement and their interpretations:
1in — one inch
-5.5cm — minus five and a half centimeters
30pt — thirty points
0 — a measurement of zero with the unit omitted
Units
All measurements are expressed in a particular unit which may be specified as a suffix to the value. The
unit is known by a short textual identifier, such as "in" for inches. The default unit is assumed to be inches.
In other words, the following are equivalent:
3.5in
3.5
The following list is the set of allowable units and the corresponding identifiers:
cm — centimeters
in — inches (This specification considers one inch to be exactly 2.54 centimeters.)
mm — millimeters
pt — points (This specification considers a point to be exactly 1/72 of an inch.)
Note that a unit specification is not required or implied when the measurement value is zero. Not all
elements may support all possible types of units, as described in
“Restrictions”
(below).
Angles
Certain measurements requires the specification of an angle. Angles are always specified in degrees and
are measured counterclockwise from a line parallel to the X axis.
Restrictions
Individual elements may place restrictions on measurements; in these cases the corresponding
specification of the element will clearly describe the restrictions — if no restriction is noted, then it shall be
assumed that the element does not exhibit any restrictions on measurements.
For instance, the specification for an element may:
Restrict the use of the sign character, limiting the measurement to either a positive or negative value
Home Index Bookmark Pages
Pages: Home Index All Pages