Previous Next


                                                    110
          CHAPTER 3                                                                          Syntax



          In these files, the trailer dictionary can contain, in addition to the entry for
          trailers shown in Table 3.13, an additional entry, as shown in Table 3.17. This
          entry is ignored by PDF 1.4 consumers, which therefore have no access to entries
          in the cross-reference stream the entry refers to.

                TABLE 3.17 Additional entries in a hybrid-reference file’s trailer dictionary
KEY          TYPE       VALUE

XRefStm      integer    (Optional) The byte offset from the beginning of the file of a cross-reference stream.

          The Size entry of the trailer must be large enough to include all objects, including
          those defined in the cross-reference stream referenced by the XRefStm entry.
          However, to allow random access, a main cross-reference section must contain
          entries for all objects numbered 0 through Size - 1 (see Section 3.4.3, “Cross-
          Reference Table”). Therefore, the XRefStm entry cannot be used in the trailer
          dictionary of the main cross-reference section but only in an update cross-
          reference section.

          When a PDF 1.5 consumer opens a hybrid-reference file, objects with entries in
          cross-reference streams are not hidden. When the application searches for an
          object, if an entry is not found in any given standard cross-reference section, the
          search proceeds to a cross-reference stream specified by the XRefStm entry before
          looking in the previous cross-reference section (the Prev entry in the trailer).

          Hidden objects, therefore, have two cross-reference entries. One is in the cross-
          reference stream. The other is a free entry in some previous section, typically the
          section referenced by the Prev entry. A PDF 1.5 consumer looks in the cross-
          reference stream first, finds the object there, and ignores the free entry in the
          previous section. A PDF 1.4 consumer ignores the cross-reference stream and
          looks in the previous section, where it finds the free entry. The free entry must
          have a next-generation number of 65535 so that the object number is never reused.

          There are limitations on which objects in a hybrid-reference file can be hidden
          without making the file appear invalid to PDF 1.4 and earlier consumers. In
          particular, the root of the PDF file, the document catalog (see Section 3.6.1,
          “Document Catalog”), must not be hidden, nor any object that is visible from the
          root. Such objects can be determined by starting from the root and working
          recursively:
          • In any dictionary that is visible, direct objects are visible. The value of any re-
            quired key-value pair is visible.

Previous Next