PDF Document Catalog

The document catalog (dictionary type /Catalog) is the root object of every PDF — the single starting point referenced by the /Root entry in the trailer dictionary. It contains or references all document-level metadata and structure: the page tree (/Pages), document outline/bookmarks (/Outlines), the names dictionary (/Names), form fields (/AcroForm), viewer preferences (/ViewerPreferences), page layout settings, permissions, and the document-level JavaScript.

The PDF document catalog (formally the Catalog dictionary) is the root object of every PDF file. It is the entry point from which all document-level data is accessible: the page tree, outlines (bookmarks), named destinations, embedded files, form fields, viewer preferences, and more. Every valid PDF must have a document catalog, and every catalog must be reachable from the file's cross-reference table via the /Root entry in the file trailer.

Understanding the document catalog is essential for PDF developers and anyone building tools that read, write, or validate PDF files. It is the map of the entire document.

/Root in the trailer and catalog structure

The PDF file trailer (or cross-reference stream) contains a dictionary with a /Root entry — an indirect reference to the catalog object. For example:

<code>&lt;&lt; /Size 42 /Root 1 0 R /Info 2 0 R /ID [...] &gt;&gt;</code>

Object 1 is then the catalog:

<code>1 0 obj</code> <code>&lt;&lt; /Type /Catalog</code> <code> /Pages 3 0 R</code> <code> /Outlines 4 0 R</code> <code> /Names 5 0 R</code> <code> /AcroForm 6 0 R</code> <code> /ViewerPreferences &lt;&lt; /HideToolbar true &gt;&gt;</code> <code>&gt;&gt;</code> <code>endobj</code>

The catalog's /Type must be /Catalog. The most important entries:

<strong>/Pages</strong> (required) — An indirect reference to the root of the page tree. Every page in the document is reachable from this object. See <a href="/glossary/pdf-page-tree" target="_blank" rel="noopener">PDF Page Tree</a> for the page tree structure.

<strong>/Outlines</strong> (optional) — The root of the outline (bookmarks) tree. Contains a linked list of bookmark items, each with a /Title, /Dest or /A (action), and /First, /Last, /Next, /Prev pointers for the tree structure.

<strong>/Names</strong> (optional) — A dictionary of name trees providing named resource lookups: /Dests (named destinations), /JavaScript (document-level scripts), /EmbeddedFiles (file attachments), and others. See <a href="/glossary/pdf-name-tree" target="_blank" rel="noopener">PDF Name Tree</a> for the name tree structure.

<strong>/AcroForm</strong> (optional) — The document-level form dictionary for AcroForm interactive forms. Contains the /Fields array (all form fields in the document), /DA (default appearance), /DR (default resources), /XFA (XFA form data), and form flags. See <a href="/glossary/pdf-acroform" target="_blank" rel="noopener">PDF AcroForm</a> for interactive forms.

<strong>/ViewerPreferences</strong> (optional) — Controls default viewer behaviour: /HideToolbar, /HideMenubar, /HideWindowUI, /FitWindow, /CenterWindow, /DisplayDocTitle, /NonFullScreenPageMode, /Direction (reading direction), /PrintScaling, /Duplex, /PickTrayByPDFSize, /PrintPageRange.

Additional catalog entries

The document catalog contains many more optional entries:

<strong>/MarkInfo</strong> — Indicates whether the document is a tagged PDF. Contains /Marked (boolean: true if the document has a complete tag structure), /UserProperties (boolean: true if user properties are present in the structure tree), /Suspects (boolean: true if some objects may not be correctly tagged). PDF/UA validation checks this entry. See <a href="/glossary/tagged-pdf" target="_blank" rel="noopener">Tagged PDF</a>.

<strong>/StructTreeRoot</strong> — The root of the document's logical structure tree (tag tree). Present in tagged PDFs. Required for PDF/UA. The structure tree maps the document's logical structure (headings, paragraphs, tables, figures) to the physical content streams.

<strong>/Lang</strong> — The natural language of the document as a BCP 47 language tag (e.g., "en-US", "de", "zh-TW"). Required for PDF/UA. Used by screen readers and text-to-speech engines for correct pronunciation and rendering.

<strong>/Metadata</strong> — An XMP metadata stream containing Dublin Core, PDF, and XMP Basic properties. The canonical source of document metadata (title, author, creation date, modification date, producer, creator tool). See <a href="/glossary/pdf-metadata" target="_blank" rel="noopener">PDF Metadata</a> for XMP vs Info dictionary details.

<strong>/OCProperties</strong> — Optional Content Properties dictionary. Present if the document uses layers (optional content groups). Contains the /OCGs array (all layer objects), /D (default configuration — which layers are on/off by default), and /Configs (alternate configurations).

<strong>/Perms</strong> — Document permissions (for encrypted documents). The /UR3 entry contains a usage rights signature enabling Reader Extensions (allowing Acrobat Reader to exercise features normally reserved for Acrobat). See <a href="/glossary/pdf-encryption" target="_blank" rel="noopener">PDF Encryption</a>.

<strong>/OpenAction</strong> — The action or destination executed when the document is opened. Can be a named destination (to open to a specific page), a GoTo action (explicit destination), or a JavaScript action (to run a script on open). PDF/A prohibits JavaScript OpenActions.

Catalog in incremental updates and linearised PDFs

<strong>Incremental updates</strong> — When a PDF is saved with incremental update (the standard for signed PDFs and Acrobat "Save" operations), new versions of objects — including the catalog — are appended to the end of the file. The new trailer's /Root points to the new (updated) catalog object. The original catalog and original body remain intact before the update. This is the basis for PDF digital signature validation: the signed byte range includes the original body up to the signature field; the incremental update following the signature contains the signature value itself but must not change any signed content. See <a href="/glossary/pdf-digital-signature" target="_blank" rel="noopener">PDF Digital Signatures</a>.

<strong>Linearised PDFs</strong> — In a linearised ("optimised for web") PDF, the file is structured to allow page 1 to be rendered before the entire file is downloaded. Linearised PDFs have a special /Linearized dictionary as the first object in the file and a specific object ordering designed for byte-range delivery. The document catalog is written near the beginning of the file (within the first part), though it may be updated by a hint-containing append at the end. The /Linearized entry is removed if the document is subsequently modified without re-linearising.

<strong>Catalog validation</strong> — PDF validators check the catalog as part of conformance verification. PDF/A validators check /MarkInfo, /Lang, /Metadata, /StructTreeRoot, and the absence of prohibited entries. PDF/UA validators check /Lang and /MarkInfo specifically. PDF/X validators check the absence of /AcroForm interactive actions and JavaScript. The catalog is the starting point for all conformance checks because all document-level resources are reachable from it.

Frequently asked questions

What does the /Root entry in a PDF trailer do?

The /Root entry in the PDF file trailer (or the Prev-chain of cross-reference streams) contains an indirect object reference to the document catalog — the master dictionary that provides access to everything in the document. When a PDF viewer opens a file, it reads the file's last cross-reference table or stream (finding it via the startxref offset at the end of the file), reads the trailer dictionary from that structure, and follows /Root to the catalog object. From the catalog, it follows /Pages to the page tree and retrieves page 1 for initial display. The /Root reference is mandatory in every valid PDF; a PDF without /Root cannot be opened.

What is the /ViewerPreferences dictionary used for?

The /ViewerPreferences dictionary in the document catalog controls how the PDF viewer presents the document when opened. Useful settings include: /HideToolbar and /HideMenubar (kiosk mode — hides the viewer's UI chrome for full-screen presentation PDFs), /FitWindow (resizes the viewer window to fit the first page), /CenterWindow (centres the viewer on screen), /DisplayDocTitle (shows the document's XMP title in the window title bar instead of the filename), /Direction /R2L (right-to-left reading order, for Arabic and Hebrew documents), and /PrintScaling /None (disables print-to-fit scaling so the document prints at its defined size — important for forms with specific dimensions). These preferences are suggestions to the viewer; individual viewers may or may not respect them.

Can a PDF have multiple catalogs?

No. A valid PDF has exactly one document catalog, referenced by /Root in the trailer. However, in incremental update scenarios, there will be multiple cross-reference sections (one per update), each with a trailer. The "current" catalog is the one referenced by the /Root in the most recent (last in the file) trailer. Earlier trailers may reference earlier versions of the catalog (before updates). This is how PDF viewers can present a document at a specific revision — by stopping at a specific cross-reference section. Tools like Acrobat's "Examine Document" panel and forensic PDF tools can reconstruct the document's update history by following the /Prev pointers in trailers back to earlier versions.