SECTION 8.6
679
Interactive Forms
the dimensions of the annotation rectangle (the
Rect
entry in the widget anno-
tation dictionary).
•
All other entries in the appearance stream’s form dictionary are set to their
default values (see Section 4.9, “Form XObjects”).
The appearance stream includes the following section of marked content, which
represents the portion of the stream that draws the text:
Example 8.14
/Tx BMC
% Begin marked content with tag Tx
q
% Save graphics state
…
Any required graphics state changes, such as clipping
…
BT
% Begin text object
…
Default appearance string ( DA )
…
…
Text-positioning and text-showing operators to show the variable text
…
ET
% End text object
Q
% Restore graphics state
EMC
% End marked content
The
BMC
(begin marked content) and
EMC
(end marked content) operators are
discussed in Section 10.5, “Marked Content”.
q
(save graphics state) and
Q
(re-
store graphics state) are discussed in Section 4.3.3, “Graphics State Operators”.
BT
(begin text object) and
ET
(end text object) are discussed in Section 5.3, “Text
The default appearance string (
DA
) contains any graphics state or text state oper-
ators needed to establish the graphics state parameters, such as text size and color,
for displaying the field’s variable text. Only operators that are allowed within text
objects may occur in this string (see Figure 4.1 on page 197). At a minimum, the
string must include a
Tf
(text font) operator along with its two operands,
font
and
size
. The specified
font
value must match a resource name in the
Font
entry of the
default resource dictionary (referenced from the
DR
entry of the interactive form
dictionary; see Table 8.67). A zero value for
size
means that the font is to be
auto-
sized:
its size is computed as a function of the height of the annotation rectangle.
The default appearance string should contain at most one
Tm
(text matrix) opera-
tor. If this operator is present, the viewer application should replace the horizon-
tal and vertical translation components with positioning values it determines to
be appropriate, based on the field value, the quadding (
Q
) attribute, and any lay-
out rules it employs. If the default appearance string contains no
Tm
operator, the