5
Representing and Processing Rich Text
This chapter explains how rich text is represented in the DOMs that compose an XFA form. It explains how
rich text is identified, how it is converted into plain text as it is represented in the XFA DOMs and how it is
printed.
About Rich Text
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.
Prior to XFA 2.4 rich text was limited to languages that presented in the left-to-right, top-to-bottom order
that European languages use. With XFA 2.4 right-to-left top-to-bottom languages such as Hebrew and
Arabic are also supported. This change expands the set of Unicode character points that are supported.
With XFA 2.4 the set is expanded to include all characters in right-to-left top-to-bottom languages plus
those code points which Unicode assigns to explicitly control flow direction. XFA processors also infer flow
direction from the locale property of the container and from the content of the text. However these added
capabilities are invisible to rich text markup, which is the subject of this chapter. Instead, for more
information about text flow direction see
“Flowing Text Within a Container” on page 62.
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
span
element, as shown in the following example.
<field1>
<body xmlns="http://www.w3.org/1999/xhtml">
<p>The following <span style="font-weight:bold">word</span>
is in bold.</p>
</body>
</field1>
The set of formatting markup supported by XFA processors is discussed in detail in
“Rich Text Reference”
on page 934.
186
Home Index Bookmark Pages
Pages: Home Index All Pages