Previous Next


                                           379
SECTION 4.10                                                             Optional Content



  A PDF viewer should display the optional content groups as follows:

     Frog Anatomy
        Skin
        Bones
     Tree Anatomy
        Bark
        Wood

Example 4.38

  Given the following PDF objects:
                                            % Page contents
     /OC /L1 BDC                            % Layer 1
         /OC /L1a BDC                       % Sublayer A of layer 1
            0 0 100 100 re f
         EMC
         /OC /L1b BDC                       % Sublayer B of layer 1
            0 100 100 100 re f
         EMC
     EMC
     ...
     << /L1 1 0 R                           % Resource names
         /L1a 2 0 R
         /L1b 3 0 R
     >>
     ...                                    %Optional content groups
     1 0 obj <</Type /OCG /Name (Layer 1)>> endobj
     2 0 obj <</Type /OCG /Name (Sublayer A)>> endobj
     3 0 obj <</Type /OCG /Name (Sublayer B)>> endobj
     ...
     4 0 obj                                % Configuration dictionary
         << /Order [1 0 R [2 0 R 3 0 R]] >>

  A PDF viewer should display the OCGs as follows:

     Layer 1
        Sublayer A
        Sublayer B

The AS entry is an auto state array consisting of one or more usage application
dictionaries that specify how viewer applications should automatically set the
state of optional content groups based on external factors, as discussed in the fol-
lowing section.

Previous Next