liveBook · Manning

PDF object

As explained in How Computers Make Books

A PDF object is a typed structural or content unit stored in a PDF file and referenced by object number.

A PDF object is one typed unit in a file: it may describe structure, such as a page tree or catalog, or hold content, such as page operators and image data. Objects receive numbers so other objects can refer to them, as when a page points to its contents. section 11.4

A small PDF can organize its objects like this:

  • The page tree identifies the document's pages. section 11.4
  • The page-contents object stores drawing and text operators. section 11.4
  • The page object links to those contents and defines resources and page size. section 11.4
  • The document catalog gives a PDF reader its starting point. section 11.4
Listing 11.4 Our PDF skeleton
1 0 obj  #A
<</Type /Pages /Kids [3 0 R] /Count 1>>
endobj
2 0 obj  #B
<</Length 235>>
stream
\textit{(all of our page data from above)}
endstream
endobj
3 0 obj  #C
<</Type /Page
  /Parent 1 0 R
  /Resources
    <</Font
      <</F0 <</Type /Font /Subtype /Type1 /BaseFont /Times-Italic>>>>
    >>
  /MediaBox[0 0 300 200]
  /Rotate 0
  /Contents[2 0 R]
>> 
endobj
4 0 obj  #D
<</Type /Catalog /Pages 1 0 R>>
endobj
xref
0 5   #E
0000000000 65535 f
0000000015 00000 n
0000000066 00000 n
0000000163 00000 n
0000000348 00000 n
trailer
<</Root 4 0 R /Size 5>>
startxref
393
%%EOF

Inspect the numbered objects, their references, streams, and the surrounding cross-reference and trailer structure. section 11.4

How How Computers Make Books covers it

How deep it goes
Shows a four-object PDF skeleton and references, while deferring detailed trailer mechanics and image-data interpretation.
Examples
Uses text, underlining, a tiny grayscale image, and a four-object PDF skeleton as concrete examples.
What it assumes
Assumes familiarity with page-description operators and introduces object organization through a minimal concrete file.
What you can do after
Build a simple PDF skeleton containing page content, page metadata, resources, a catalog, and numbered references.
How it connects
Connects page trees, page contents, page objects, fonts, document catalogs, streams, trailers, and cross-reference tables.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of How Computers Make Books. The section links point to the parts of the book it draws on.