Previous Next


                                            368
CHAPTER 4                                                                           Graphics



Example 4.32

  << /Type /OCMD                       % Content belonging to this optional content
                                       % membership dictionary is controlled by the states
       /OCGs [12 0 R 13 0 R 14 0 R]    % of three optional content groups.
       /P /AllOn                       % Content is visible only if the state of all three
  >>                                   % groups is ON; otherwise it’s hidden.

Example 4.33

  << /Type /OCMD
     /VE [/And 12 0 R 13 0 R 14 0 R]   % Visibility expression equivalent to Example 4.32.
  >>

Example 4.34 shows a more complicated visibility expression based on five op-
tional content groups, represented by objects 1 through 5. It is equivalent to
         “OCG 1” OR (NOT “OCG 2”) OR (“OCG 3” AND “OCG 4” AND “OCG 5”)

Example 4.34

  << /Type /OCMD
     /VE [/Or                          % Visibility expression: OR
            10R                        % OCG 1
            [/Not 2 0 R]               % NOT OCG 2
            [/And 3 0 R 4 0 R 5 0 R]   % OCG 3 AND OCG 4 AND OCG 5
         ]
  >>


Intent

The Intent entry in Table 4.48 provides a way to distinguish between different in-
tended uses of optional content. For example, many document design applica-
tions, such as CAD packages, offer layering features for collecting groups of
graphics together and selectively hiding or viewing them for the convenience of
the author. However, this layering may be different (at a finer granularity, for ex-
ample) than would be useful to consumers of the document. Therefore, it is pos-
sible to specify different intents for optional content groups within a single
document. A given application may decide to use only groups that are of a specif-
ic intent.

PDF 1.5 defines two intents: Design, which is intended to represent a document
designer’s structural organization of artwork, and View, which is intended for in-

Previous Next