Chapter 2, Template Features for Designing Static Forms
XFA Specification
Formatting Text That Appears as Fixed or Variable Content
45
<value>
<text>5.12345</text>
</value>
</draw>
“Flowing Text Within a Container” on page 62
describes text justification in growable containers.
Line Height
To flow text and other flowed objects, the application may have to choose break points for wrapping. The
result is that the flowed content is rendered as a series of one or more lines. The height of each line is
known as the line height. If line height is not specified in a
para
element, it is typically determined from
the current
font
element. If multiple fonts are used in a line, the processing application must use the
maximum line height asserted by any of the fonts in the line.
Other Formatting
In addition to alignment, justification and line height, the
para
element may specify left and right
margins, radix offset, spacing above and below the paragraph, widow/orphan settings relative to page
breaks, tab stops and tab indenting.
In addition to line height, the
font
element may specify baseline shift, strike-through characteristics,
overline, underline, angle, size, typeface, and weight.
Formatting Rich Text for Fixed and Variable Content
Rich text is text data that uses a subset of HTML and CSS markup conventions to signify formatting such as
bold and underline. Rich text may also include embedded text objects. XFA supports the subset of HTML
and CSS markup conventions described in
“Rich Text Reference” on page 934.
Rich text may appear in data supplied to the XFA form. Rich text may also appear in XFA templates as
boilerplate text, field captions, or default text values.
Rich Text Used for Formatting
Rich text data is formatted as specified by the markup specifications in the rich text. The markup
specifications take precedence over formatting specifications in the containing element, which appear in
the
font
and
para
elements.
In general, GUI-based template design applications and XFA processing applications provide formatting
buttons that allow users to apply styling characteristics to text. For example, the UI in such applications
may provide a
Bold
button the user applies to selected text. In response, the application converts the
entire body of in-focus text into a rich text representation and encapsulates the selected text within a <
b
>
element, as shown in the example in the following example.
In the following example, the markup instructions specify the font family should be Courier Std and
specify that the words "second" and "fourth" should be bold, as illustrated below the example XFA. Also
notice the appearance of the attribute
allowRichText="1"
, which tells an XFA processing application
that its UI must support entry of rich text values for the field.
Home Index Bookmark Pages
Pages: Home Index All Pages