Previous Next


                                                93
      SECTION 3.4                                                              File Structure



      codes are 128 or greater. This ensures proper behavior of file transfer applications
      that inspect data near the beginning of a file to determine whether to treat the file’s
      contents as text or as binary.


3.4.2 File Body

      The body of a PDF file consists of a sequence of indirect objects representing the
      contents of a document. The objects, which are of the basic types described in
      Section 3.2, “Objects,” represent components of the document such as fonts,
      pages, and sampled images. Beginning with PDF 1.5, the body can also contain
      object streams, each of which contains a sequence of indirect objects; see Section
      3.4.6, “Object Streams.”


3.4.3 Cross-Reference Table

      The cross-reference table contains information that permits random access to
      indirect objects within the file so that the entire file need not be read to locate any
      particular object. The table contains a one-line entry for each indirect object,
      specifying the location of that object within the body of the file. (Beginning with
      PDF 1.5, some or all of the cross-reference information may alternatively be
      contained in cross-reference streams; see Section 3.4.7, “Cross-Reference
      Streams”.)

      The cross-reference table is the only part of a PDF file with a fixed format, which
      permits entries in the table to be accessed randomly. The table comprises one or
      more cross-reference sections. Initially, the entire table consists of a single section
      (or two sections if the file is linearized; see Appendix F). One additional section is
      added each time the file is updated (see Section 3.4.5, “Incremental Updates”).

      Each cross-reference section begins with a line containing the keyword xref.
      Following this line are one or more cross-reference subsections, which may appear
      in any order. The subsection structure is useful for incremental updates, since it
      allows a new cross-reference section to be added to the PDF file, containing
      entries only for objects that have been added or deleted. For a file that has never
      been updated, the cross-reference section contains only one subsection, whose
      object numbering begins at 0.

Previous Next