PDF Format Reference

A concise reference for PDF versions, the page tree, metadata and Base64 conversion.

A PDF is a header, a body of objects, a cross-reference table and a trailer. The trailer points at the catalog, whose page tree lists every page.

01What lives where

  • %PDF-x.y at the start states the version.
  • The trailer names the /Root catalog and the optional /Info dictionary.
  • The page tree under /Root lists the pages and their /MediaBox and /Rotate values.
  • /Encrypt marks an encrypted document and /Linearized marks a linearized one.

02Base64 is just an encoding

Base64 does not change the document; it only represents the same bytes as text, with an optional data-URL prefix.

Frequently asked questions

Does Base64 change the PDF?
No. It is the same bytes in a text encoding; decoding restores the original file exactly.
Why can't some metadata be read?
When objects are stored in compressed streams, a dependency-free reader cannot inflate them and says so plainly.

Sources

  1. ISO 32000-1 - Document management - Portable document format (PDF 1.7) — ISO (accessed 2026-10-10)