Table of Contents
Set an initial-view preference, not an unenforceable command
A PDF can store document-level opening preferences for page layout, navigation panels, and an initial destination. It cannot force every reader to obey them. Browser viewers, mobile apps, accessibility modes, administrator policies, “restore last view” settings, and user choices may override or ignore the catalog entries.
This guide, last checked on September 1, 2026, shows a verified Adobe Acrobat route and a reproducible open-source pikepdf route. Both write a new file, reopen it to inspect the catalog, and require real viewer testing before distribution.
1. What the PDF catalog controls
The document Catalog can contain /PageLayout and /PageMode. Adobe’s PDF 1.7 reference defines them as optional opening preferences. The maintained pikepdf page-layout documentation makes the same limitation explicit: a viewer may ignore them or let user preferences override them.
/PageLayout describes how pages should initially be arranged. It does not combine pages, change page boxes, alter printing, or repair logical reading order. /PageMode describes the requested navigation panel or full-screen state; it is separate from the page arrangement.
If a value is absent or a graphical editor saves “Default,” do not assume identical behavior across readers. Record the actual catalog and test clean opens in the readers your audience uses.
2. Exact PageLayout names and meanings
The values are PDF name objects, written with a leading slash in the file and exposed as pikepdf.Name values in code.
| Catalog value | pikepdf value | Meaning |
|---|---|---|
/SinglePage |
Name.SinglePage |
Show one page at a time |
/OneColumn |
Name.OneColumn |
Show pages in one continuous column |
/TwoColumnLeft |
Name.TwoColumnLeft |
Show continuous facing columns, with odd-numbered pages on the left |
/TwoColumnRight |
Name.TwoColumnRight |
Show continuous facing columns, with odd-numbered pages on the right |
/TwoPageLeft |
Name.TwoPageLeft |
Show two pages at a time, with odd-numbered pages on the left |
/TwoPageRight |
Name.TwoPageRight |
Show two pages at a time, with odd-numbered pages on the right |
“Left” and “Right” affect the side on which odd-numbered pages are placed. They do not rewrite page labels, content order, binding direction, or the accessibility tree. Test the cover and first spread rather than inferring them from the filename or language.
3. Verified Adobe Acrobat interface route
Adobe’s current initial-view instructions and page-view documentation give the following route. Editing document properties may require Acrobat Pro; labels vary by platform, release, and locale.
- Make a protected backup and open a working copy in Acrobat.
- On Windows, open the menu and choose Document properties. On macOS, choose File → Document Properties.
- Select Initial View.
- Set Page Layout. Change Navigation Tab, Magnification, or Open to page only when there is a documented need.
- Save as a new output file; do not overwrite the only source.
- Close the document completely and reopen the new file.
- Inspect the visible result and test it in other readers.
Acrobat itself can restore the last view instead of applying the initial preference on a later open. Test once with a fresh copy or clean profile, then again with “Restore last view settings when reopening documents” enabled. “Default” delegates layout or magnification to the user’s preferences.
4. Reproducible open-source setup
The script below targets pikepdf 10.12.0, the documented release audited for this article. Use a dedicated virtual environment and keep the exact dependency version with the script. Re-audit the release and Python support before a future upgrade.
set -euo pipefail
python3 -m venv .venv
. .venv/bin/activate
python -m pip install 'pikepdf==10.12.0'
python -c 'import pikepdf; print(pikepdf.__version__)'
The official pikepdf installation guide documents supported Python/platform combinations. Activation differs on Windows. Do not install into an unrelated production environment, and do not process an encrypted or access-controlled PDF unless you are authorized and have an approved secret-handling path.
5. Safe pikepdf editor and validator
Save this as set_initial_view.py. It accepts only specification-defined names, refuses in-place or existing-output writes, creates input.pdf.bak, changes only the requested catalog fields, saves to a distinct output, reopens the result, checks page count and metadata snapshots, inspects the stored names, and runs pikepdf’s syntax check.
#!/usr/bin/env python3
from argparse import ArgumentParser
from pathlib import Path
from shutil import copy2
from pikepdf import Name, Pdf
LAYOUTS = {
"SinglePage": Name.SinglePage,
"OneColumn": Name.OneColumn,
"TwoColumnLeft": Name.TwoColumnLeft,
"TwoColumnRight": Name.TwoColumnRight,
"TwoPageLeft": Name.TwoPageLeft,
"TwoPageRight": Name.TwoPageRight,
}
PAGE_MODES = {
"UseNone": Name.UseNone,
"UseOutlines": Name.UseOutlines,
"UseThumbs": Name.UseThumbs,
"FullScreen": Name.FullScreen,
"UseOC": Name.UseOC,
"UseAttachments": Name.UseAttachments,
}
def snapshot(pdf: Pdf) -> tuple[int, dict[str, str], bytes | None]:
docinfo = {str(key): str(value) for key, value in pdf.docinfo.items()}
xmp = (
bytes(pdf.Root.Metadata.read_bytes())
if "/Metadata" in pdf.Root
else None
)
return len(pdf.pages), docinfo, xmp
def main() -> None:
parser = ArgumentParser()
parser.add_argument("input", type=Path)
parser.add_argument("output", type=Path)
parser.add_argument("--layout", required=True, choices=LAYOUTS)
parser.add_argument("--page-mode", choices=PAGE_MODES)
args = parser.parse_args()
source = args.input.resolve()
output = args.output.resolve()
backup = source.with_suffix(source.suffix + ".bak")
if not source.is_file():
parser.error(f"input does not exist: {source}")
if source == output:
parser.error("input and output must be different files")
if output.exists():
parser.error(f"refusing to overwrite output: {output}")
if backup.exists():
parser.error(f"refusing to overwrite backup: {backup}")
copy2(source, backup)
with Pdf.open(source) as pdf:
before = snapshot(pdf)
open_action_present = "/OpenAction" in pdf.Root
pdf.Root.PageLayout = LAYOUTS[args.layout]
if args.page_mode is not None:
pdf.Root.PageMode = PAGE_MODES[args.page_mode]
pdf.save(output, fix_metadata_version=False)
with Pdf.open(output) as check:
after = snapshot(check)
open_action_after = "/OpenAction" in check.Root
actual_layout = str(
check.Root.get("/PageLayout", Name.SinglePage)
)
actual_mode = str(check.Root.get("/PageMode", Name.UseNone))
issues = check.check_pdf_syntax()
if before != after:
raise RuntimeError("page count or metadata changed unexpectedly")
if open_action_after != open_action_present:
raise RuntimeError("OpenAction presence changed unexpectedly")
if actual_layout != f"/{args.layout}":
raise RuntimeError(f"unexpected PageLayout: {actual_layout}")
if args.page_mode is not None and actual_mode != f"/{args.page_mode}":
raise RuntimeError(f"unexpected PageMode: {actual_mode}")
if issues:
raise RuntimeError("PDF syntax issues: " + "; ".join(issues))
print(f"backup: {backup}")
print(f"output: {output}")
print(f"PageLayout: {actual_layout}")
print(f"PageMode: {actual_mode}")
print(f"OpenAction preserved: {open_action_present}")
if __name__ == "__main__":
main()
fix_metadata_version=False suppresses pikepdf’s automatic PDF-version metadata adjustment. It does not make the output byte-identical or preserve signatures. The metadata snapshot is a guard for DocumentInfo and decoded XMP; it is not a conformance or privacy audit.
6. Run, inspect, and keep evidence
Run on a disposable working copy. The baseline changes only /PageLayout; add --page-mode UseOutlines only if the document has a useful, verified outline and the viewer matrix justifies opening it.
set -euo pipefail
python set_initial_view.py input.pdf output.pdf --layout TwoPageRight
qpdf --check output.pdf
sha256sum input.pdf input.pdf.bak output.pdf
The script already reopens the output and compares /PageLayout, optional /PageMode, page count, DocumentInfo, and decoded XMP. `qpdf –check` adds an independent structural check. Use the platform’s equivalent SHA-256 command where sha256sum is unavailable. Identical hashes for the input and .bak prove the backup copy; the output should normally differ.
Keep the command, tool versions, hashes, catalog values, syntax-check result, and viewer matrix with the release record. Do not treat a successful parser check as proof that pages render, tags remain conformant, or every viewer honors the preference.
7. PageMode and OpenAction boundaries
/PageMode is optional. Use it sparingly and only when the associated content exists.
| Catalog value | pikepdf value | Requested opening mode |
|---|---|---|
/UseNone |
Name.UseNone |
No outline or thumbnail panel |
/UseOutlines |
Name.UseOutlines |
Show the document outline |
/UseThumbs |
Name.UseThumbs |
Show page thumbnails |
/FullScreen |
Name.FullScreen |
Enter full-screen mode |
/UseOC |
Name.UseOC |
Show the optional-content-group panel |
/UseAttachments |
Name.UseAttachments |
Show the attachments panel |
Avoid /FullScreen as a general document default: it can remove familiar controls and surprise keyboard, mobile, and assistive-technology users. /UseOutlines is helpful only when bookmarks are accurate; /UseAttachments is meaningful only when the attachments are expected and safe.
/OpenAction is a separate Catalog entry. The PDF reference permits either a destination array or an action dictionary. It can request an opening page and magnification, but actions can also introduce JavaScript, launch, URI, or other security-sensitive behavior. The baseline script deliberately preserves but does not create, edit, or execute /OpenAction; it reports only whether one exists. Review an existing action with a trusted PDF security tool. Do not add launch or JavaScript actions merely to control layout.
8. Test a clean open across real viewers
Copy the output under a new filename before each clean-open test so history and caches do not mask behavior. Record exact application, version, operating system, device, and policy state.
| Viewer route | Fresh-open observation | Override/reopen check | Accessibility/usability check |
|---|---|---|---|
| Adobe Acrobat/Reader desktop | Layout, spread side, panel, first page | Toggle restore-last-view and reopen | Keyboard navigation, zoom, reflow, screen reader |
| Chromium/Edge built-in viewer | Layout and first spread | New profile/private window and downloaded copy | Browser zoom, high contrast, keyboard controls |
| Firefox PDF.js | Layout and first spread | Clean profile and local-file open | Text layer, keyboard controls, screen reader route |
| macOS Preview | Layout and cover placement | Fresh copy versus recent-document state | VoiceOver, zoom, sidebar availability |
| iOS/Android chosen reader | Portrait and landscape behavior | Fresh install/profile where practical | Dynamic zoom, touch targets, reading order |
| Organizational accessibility workflow | Catalog preference observed or ignored | Approved viewer and policy settings | Tags, headings, alt text, language, order, form labels |
An embedded Web preview may use a server-rendered image or JavaScript viewer and ignore the Catalog entirely. That is a viewer result, not evidence that the PDF is malformed. Publish a recommended view in accompanying text when the layout matters, while leaving readers free to change it.
9. Accessibility and usability cautions
Facing pages can make text too small on phones and narrow windows. A fixed magnification, hidden interface, forced panel, or full-screen request can obstruct zoom, reflow, navigation, and escape routes. Prefer a modest layout preference and preserve user control.
Initial view does not create PDF tags or correct the logical reading order. Verify the document title, language, headings, lists, tables, alternative text, bookmarks, form labels, link purpose, tab order, contrast, and selectable text independently. For right-to-left or vertical publications, test the first spread with representative readers and assistive technology; TwoPageLeft/TwoPageRight alone does not encode the semantic reading direction.
Do not use page layout to conceal blank pages, broken crop boxes, or incorrect pagination. Fix the document structure instead.
10. Metadata, signatures, encryption, and conformance
Saving through any PDF editor rewrites bytes and can change object ordering, compression, trailer identifiers, or metadata handling even when page content is untouched. Compare descriptive metadata and privacy-sensitive fields before release. The script detects unexpected DocumentInfo or decoded-XMP changes, but it does not remove hidden metadata.
Any byte change can invalidate an existing digital signature. pikepdf’s security documentation states that it does not support digital signatures. Stop on a signed PDF; obtain an authorized unsigned source or change the preference before the approved signing step. Do not bypass encryption or permissions, and never put a PDF password in source code, shell history, or a public log.
PDF/A, PDF/UA, PDF/X, and organizational profiles need their own validation after saving. pikepdf’s metadata documentation warns that a conformance claim is not proof and recommends a validator such as veraPDF. Re-run the relevant validator and accessibility checks; preserving page count and metadata is not enough.
11. Rollback and release checklist
Rollback means withdrawing output.pdf and redistributing the verified input.pdf.bak or the version-controlled original. Do not “repair” the only source in place. If the output has already been published, account for CDN/browser caches and preserve the release timeline and hashes.
- [ ] The source is authorized, unsigned or scheduled for re-signing, and decryptable through an approved path.
- [ ] Input, output, and
.bakare distinct; existing files are never overwritten. - [ ] The chosen
PageLayoutis one of the six specification-defined names. - [ ]
PageModeis omitted unless a tested navigation need justifies it. - [ ] An existing
OpenActionwas reviewed; no new JavaScript or launch action was added. - [ ] The output reopens and reports the expected Catalog values and page count.
- [ ] DocumentInfo and decoded XMP match; privacy metadata was separately reviewed.
- [ ] pikepdf and qpdf structural checks pass without ignored errors.
- [ ] Relevant PDF/A, PDF/UA, PDF/X, signature, and accessibility validation was repeated.
- [ ] The multiple-viewer matrix includes a fresh open and a user-override/reopen test.
- [ ] Narrow-screen, keyboard, zoom, reflow, and assistive-technology behavior remains usable.
- [ ] Release versions, commands, hashes, observed overrides, and rollback artifact are recorded.
12. Current primary references
- Adobe Acrobat: set an initial view
- Adobe Acrobat: adjust PDF views
- Adobe: PDF Reference 1.7
- PDF Association: ISO 32000-2 resource
- pikepdf: default appearance in PDF viewers
- pikepdf: installation
- pikepdf: opening and saving
- pikepdf: main API and syntax checking
- pikepdf: metadata
- pikepdf: security and signatures
- qpdf: command-line checks
- veraPDF: validator software
13. Exact archive of the 2018 source
The complete visible source_export body follows exactly. No source text, links, spacing, or punctuation were changed; only the inert outer code fence was added. The original export and Git history remain unchanged.
Warning: the archived wording and Acrobat path are 2018 historical content. The phrase “force” is not an interoperability guarantee. Use the maintained guide above for current operations.
Recently, I read a paper with a default 2-page-in-one-sheet view like a book. Thus, I was wondering how it get achieved.
Open your pad file with Adobe Acrobat or any other editable software. Then, click File->Properties->Initial View->Page Layout->{Any View You Want}
