Previous Next


                                                        149
  SECTION 3.6                                                              Document Structure



  Inheritance of Page Attributes

  Some of the page attributes shown in Table 3.27 are designated as inheritable. If
  such an attribute is omitted from a page object, its value is inherited from an
  ancestor node in the page tree. If the attribute is a required one, a value must be
  supplied in an ancestor node. If the attribute is optional and no inherited value is
  specified, the default value is used.

  An attribute can thus be defined once for a whole set of pages by specifying it in
  an intermediate page tree node and arranging the pages that share the attribute as
  descendants of that node. For example, a document might specify the same
  media box for all of its pages by including a MediaBox entry in the root node of
  the page tree. If necessary, an individual page object could override this inherited
  value with a MediaBox entry of its own.

  Note: In a document conforming to the Linearized PDF organization (see Appen-
  dix F), all page attributes must be specified explicitly as entries in the page dictio-
  naries to which they apply; they may not be inherited from an ancestor node.

  Figure 3.6 illustrates the inheritance of attributes. In the page tree shown, pages 1,
  2, and 4 are rotated clockwise by 90 degrees, page 3 by 270 degrees, page 6 by 180
  degrees, and pages 5 and 7 not at all (0 degrees).

                                                      Pages




           Pages                                      Pages                           Pages
         /Rotate 90                                                                 /Rotate 180




Page                  Page                   Pages                Page     Page                     Page
                                                                                                  /Rotate 0
Page 1                Page 2                                      Page 5   Page 6                  Page 7



                                  Page                 Page
                               /Rotate 270           /Rotate 90
                                 Page 3               Page 4


                                    FIGURE 3.6 Inheritance of attributes

Previous Next