PDF Viewer Preferences

The PDF Viewer Preferences dictionary (/ViewerPreferences in the document catalogue) specifies how a PDF viewer should display the document when it is opened — controlling the initial page layout (single page, two-up, continuous scroll), whether to hide the menu bar and toolbars for a presentation mode, reading direction (left-to-right or right-to-left), and print scaling defaults.

The PDF Viewer Preferences dictionary, stored under the <code>/ViewerPreferences</code> key in the document catalogue (<code>/Catalog</code>), specifies how a PDF viewer application should display the document when it is opened. The dictionary is optional — if absent, viewers use their own default display settings. When present, the entries in <code>/ViewerPreferences</code> are interpreted as requests or recommendations to the viewer; conforming readers are expected to honour them, but the user can typically override them through the viewer's own settings.

Viewer preferences cover a range of display behaviours: how the document is initially laid out (single page vs. continuous scroll vs. two-page spread), what the viewer's UI should show (toolbars, menu bars, window chrome), how the document should be sized when opened, the reading direction, and how the document title should be displayed in the title bar.

Page layout and page mode

Two of the most commonly used viewer preferences control the initial page display mode. Note that these are distinct from the <code>/ViewerPreferences</code> dictionary — they are entries in the document catalogue itself, but they work alongside viewer preferences:

<strong><code>/PageLayout</code></strong> (in the catalogue) — Controls how pages are arranged: - <code>/SinglePage</code> — Display one page at a time. - <code>/OneColumn</code> — Continuous single-column scroll. - <code>/TwoColumnLeft</code> — Two-page spread with the first page on the left. - <code>/TwoColumnRight</code> — Two-page spread with the first page on the right. - <code>/TwoPageLeft</code> — Two pages at a time, first on the left (no continuous scroll). - <code>/TwoPageRight</code> — Two pages at a time, first on the right.

<strong><code>/PageMode</code></strong> (in the catalogue) — Controls what optional PDF UI panels are open at launch: - <code>/UseNone</code> — Neither outlines nor thumbnails visible (default). - <code>/UseOutlines</code> — Bookmarks/outlines panel open. - <code>/UseThumbs</code> — Page thumbnails panel open. - <code>/FullScreen</code> — Full-screen mode (no menu bar or toolbar visible). - <code>/UseOC</code> — Optional content panel open (for layered PDFs). - <code>/UseAttachments</code> — Attachments panel open.

<strong>Within <code>/ViewerPreferences</code></strong>, the display control entries include: - <code>/HideToolbar</code> (boolean) — Hide the viewer's toolbar. - <code>/HideMenubar</code> (boolean) — Hide the viewer's menu bar. - <code>/HideWindowUI</code> (boolean) — Hide all window UI chrome. - <code>/FitWindow</code> (boolean) — Resize the window to fit the first page. - <code>/CenterWindow</code> (boolean) — Centre the viewer window on screen. - <code>/DisplayDocTitle</code> (boolean) — Display the document title (from XMP/DocInfo metadata) in the title bar rather than the filename.

Direction, printing, and duplex preferences

<strong>Reading direction (<code>/Direction</code>)</strong> — Specifies the predominant reading order of the document. Values are <code>/L2R</code> (left to right, the default) and <code>/R2L</code> (right to left, for Arabic, Hebrew, and other RTL scripts). This affects how two-page spread layouts position the first page, which column is considered "first" in a two-column layout, and how annotations and form fields are navigated in accessibility contexts.

<strong>Print scaling (<code>/PrintScaling</code>)</strong> — Controls print scaling behaviour: - <code>/AppDefault</code> — Use the viewer's default print scaling (typically "Fit to Page"). - <code>/None</code> — Do not scale — print at the document's actual size. Important for forms, engineering drawings, and legal documents where precise dimensions must be preserved.

<strong>Duplex printing (<code>/Duplex</code>)</strong> — Specifies the duplex mode preference for printing: - <code>/Simplex</code> — Single-sided. - <code>/DuplexFlipShortEdge</code> — Duplex, flipping on the short edge (landscape duplex / "top binding"). - <code>/DuplexFlipLongEdge</code> — Duplex, flipping on the long edge (portrait duplex / "left binding").

<strong>Number of copies (<code>/NumCopies</code>)</strong> — The preferred number of copies to print. Many viewers and print dialogs pre-fill the copy count from this value.

<strong>Print page range (<code>/PrintPageRange</code>)</strong> — An array specifying the default print range as page index pairs: <code>[0 2 4 7]</code> would mean "pages 1–3 and 5–8". Not all viewers support this entry.

Viewer preferences in practice: use cases and limitations

<strong>Forms and surveys</strong> — PDF forms that are intended to be printed for manual completion benefit from <code>/PrintScaling /None</code> to ensure the form fields print at the correct physical size. Combined with <code>/PageLayout /SinglePage</code> and <code>/PageMode /UseNone</code>, this creates a focused, print-ready experience when the PDF is opened.

<strong>Presentations and kiosk PDFs</strong> — PDFs used for presentations or kiosk display often use <code>/PageMode /FullScreen</code> (specified in the catalogue, not in ViewerPreferences) to launch in full-screen mode. This works well in Acrobat Reader but may be overridden by browser-embedded PDF viewers for security reasons.

<strong>RTL documents</strong> — Arabic, Hebrew, Persian, and other right-to-left language PDFs should set <code>/Direction /R2L</code> to ensure two-page spreads and navigation are oriented correctly. Many authoring tools automatically set this when producing RTL content; others require manual setting.

<strong>Limitations</strong> — Viewer preference compliance varies across PDF viewers. Browser-embedded viewers (Chrome's built-in viewer, Firefox's PDF.js) often ignore many viewer preference entries for security and UX consistency reasons. Adobe Reader and Acrobat have the most complete implementation. When viewer preferences are critical for a workflow (e.g., a print kiosk, an interactive presentation), testing in the specific viewer is essential.

<strong>Interaction with JavaScript</strong> — PDF JavaScript actions can programmatically set viewer state (zoom, page layout, page display mode) at runtime, complementing the static viewer preferences declared in the catalogue. However, JavaScript is disabled or restricted in many security-conscious environments.

Frequently asked questions

How do I set the initial page layout of a PDF?

The initial page layout is controlled by the /PageLayout entry in the PDF document catalogue (not in /ViewerPreferences). You can set it to /SinglePage (one page at a time), /OneColumn (continuous scroll), /TwoColumnLeft or /TwoColumnRight (two-page spread). In Adobe Acrobat Pro: File > Properties > Initial View > Layout and Magnification > Page Layout. In pdf-lib (JavaScript): pdfDoc.setPageLayout(PageLayouts.OneColumn). In iText (Java/C#): writer.setViewerPreferences(PdfWriter.PageLayoutTwoColumnLeft). Note that browser-embedded PDF viewers may ignore this setting — it is most reliably honoured by Adobe Reader/Acrobat.

What does /DisplayDocTitle do and why does it matter for accessibility?

/DisplayDocTitle is a boolean entry in the /ViewerPreferences dictionary. When set to true, the PDF viewer displays the document's /Title metadata value in the application title bar, rather than the filename. This matters for accessibility because screen reader users hear the title bar content when switching between applications or documents. A meaningful title (e.g., "2026 Annual Report — Acme Corporation") is far more useful than a filename (e.g., "doc_v3_final_PRINT.pdf"). WCAG 2.1 PDF Technique PDF18 recommends setting /DisplayDocTitle true and providing a meaningful /Title value for accessible PDFs. In PDF/UA, a /Title value in the XMP metadata is required.

Why does /PageMode /FullScreen not work in web browsers?

Browser-embedded PDF viewers (Chrome's built-in viewer, Firefox via PDF.js, Edge's viewer) generally do not honour /PageMode /FullScreen for security reasons — allowing a PDF to trigger full-screen mode without explicit user interaction would create potential phishing attack surfaces (a malicious PDF could render a fake OS or browser UI in full screen). Browsers require user-initiated full screen (via F11 or a browser-level button) and do not allow documents to trigger it programmatically. Adobe Reader and Acrobat installed as standalone applications do honour /FullScreen page mode, and may prompt the user to confirm before entering full-screen mode depending on security settings. For reliable full-screen presentation use cases, test in the specific viewer used in the target environment.