Previous Next


                                              668
CHAPTER 8                                                         Interactive Features



When a set-OCG-state action is performed, the State array is processed from left
to right. Each name is applied to subsequent groups in the array until the next
name is encountered, as shown in the following example.

Example 8.13

   << /S /SetOCGState
      /State [/OFF 2 0 R 3 0 R /Toggle 16 0 R 19 0 R /ON 5 0 R]
   >>

A group can appear more than once in the State array; its state is set each time it
is encountered, based on the most recent name. For example, if the array con-
tained [/OFF 1 0 R /Toggle 1 0 R], the group’s state would be ON after the action was
performed. ON, OFF and Toggle sequences have no required order. More than
one sequence in the array may contain the same name.

Note: While the specification allows a group to appear more than once in the State
array, this is not intended to implement animation or any other sequential drawing
operations. PDF processing applications are free to accumulate all state changes and
apply only the net changes simultaneously to all affected groups before redrawing.


Rendition Actions

A rendition action (PDF 1.5) controls the playing of multimedia content (see Sec-
tion 9.1, “Multimedia”). This action can be used in the following ways:

• To begin the playing of a rendition object (see Section 9.1.2, “Renditions”), as-
  sociating it with a screen annotation (see “Screen Annotations” on page 639).
  The screen annotation specifies where the rendition is played unless otherwise
  specified.
• To stop, pause, or resume a playing rendition.
• To trigger the execution of a JavaScript script that may perform custom opera-
  tions.

Table 8.64 lists the entries in a rendition action dictionary.

Previous Next