PDF Names Dictionary

An internal registry within a PDF document that stores a centralized list of human-readable names mapped to specific resources, such as bookmarks, page destinations, JavaScript actions, and embedded files.

What is the Names Dictionary?

In a PDF, most things are identified by "Object Numbers" (like Object #42). While computers love numbers, humans prefer names. The **Names Dictionary** is a centralized look-up system. Instead of remembering that the "Appendix" starts at Object #1502, the document can simply create a name called "Appendix" and map it to that object inside the **Names Dictionary**.

This system is crucial for stability. Imagine you have 50 links pointing to a specific chart on Page 10. If you add a new page at the beginning of the book, that chart is now on Page 11. If your links used page numbers, they are all broken. But if your links use a **Named Destination** stored in the Names Dictionary, the links stay perfectly intact because the "Name" automatically follows the target object wherever it goes.

Standard Categories in the Names Dictionary

Why it Matters

The "Tree" Structure

For very large documents with thousands of names, the Names Dictionary is organized into a **Name Tree** (similar to the Page Tree). This ensures that looking up the name "Zeppelin" takes the same amount of time as looking up "Apple," regardless of how many names are in the file.

Real-World Examples

A software company releases a 300-page "API Documentation" PDF. They want developers to be able to click on a link in a blog post and jump directly to the "Authentication Methods" chapter. The technical writer creates a **Named Destination** called `auth_methods` and registers it in the **Names Dictionary**. Now, a developer can simply visit `company.com/docs.pdf#auth_methods` and their browser will instantly scroll to the correct page and zoom level.

An architectural firm creates a master PDF project file that includes the 3D blueprints, 5 separate cost spreadsheets, and three legal contracts. They "attach" all these files to the PDF. The PDF software uses the **Names Dictionary** (under the `/EmbeddedFiles` category) to list all these attachments by their actual filenames (e.g., `budget_2026.xlsx`). When the client opens the PDF, they see a clean list of attachments that they can double-click and open instantly—no matter how many times the pages of the main PDF are reordered.

When Should You Manage the Names Dictionary?