Previous Next


                                                 369
       SECTION 4.10                                                          Optional Content



       teractive use by document consumers. More intents may be added in future PDF
       versions; for compatibility with future versions, PDF consumers should allow un-
       recognized Intent values.

       Configuration dictionaries (see “Optional Content Configuration Dictionaries”
       on page 375) also contain an Intent entry. If one or more of a group’s intents is
       contained in the current configuration’s set of intents, the group is used in deter-
       mining visibility. If there is no match, the group has no effect on visibility.

       Note: If the configuration’s Intent is an empty array, no groups are used in determin-
       ing visibility; therefore, all content is considered visible.


4.10.2 Making Graphical Content Optional

       Graphical content in a PDF file can be made optional by specifying membership
       in an optional content group or optional content membership dictionary. Two
       primary mechanisms are available:
       • Sections of content streams delimited by marked-content operators can be
         made optional, as described in “Optional Content in Content Streams,” below.
       • Form and image XObjects and annotations can be made optional in their en-
         tirety by means of a dictionary entry, as described in “Optional Content in
         XObjects and Annotations” on page 374.

       When a piece of optional content in a PDF file is determined to be hidden, the
       following occurs:
       • The content is not drawn.
       • Graphics state operations, such as setting the color, transformation matrix, and
         clipping, are still applied. In addition, graphics state side effects that arise from
         drawing operators are applied; in particular, the current text position is updat-
         ed even for text wrapped in optional content. In other words, graphics state pa-
         rameters that persist past the end of a marked-content section must be the
         same whether the optional content is visible or not. For example, hiding a sec-
         tion of optional content does not change the color of objects that do not belong
         to the same optional content group.
         Note: This rule also applies to operators that set state that is not strictly graphics
         state; for example, BX and EX.

Previous Next