Previous Next


                                        103
SECTION 3.4                                                            File Structure



An object stream itself, like any stream, is an indirect object, and there must be an
entry for it in a cross-reference table or cross-reference stream (see Section 3.4.7,
“Cross-Reference Streams”), although there might not be any references to it (of
the form 243 0 R).

The generation number of an object stream and of any compressed object is
implicitly zero. If either an object stream or a compressed object is deleted and
the object number is freed, that object number can be reused only for an ordinary
(uncompressed) object other than an object stream. When new object streams
and compressed objects are created, they must always be assigned new object
numbers, not old ones taken from the free list.

Example 3.8 shows three objects (two fonts and a font descriptor) as they would
be represented in a PDF 1.4 or earlier file, along with a cross-reference table. In
Example 3.9, the same objects are stored in an object stream in a PDF 1.5 file,
along with a cross-reference stream.

Example 3.8

   11 0 obj
      << /Type /Font
         /Subtype /TrueType
         ...other entries...
         /FontDescriptor 12 0 R
      >>
   endobj

   12 0 obj
      << /Type /FontDescriptor
         /Ascent 891
         ...other entries...
         /FontFile2 22 0 R
      >>
   endobj

   13 0 obj
      << /Type /Font
         /Subtype /Type0
         ...other entries...
         /ToUnicode 10 0 R

Previous Next