A handbook that says how it wants to be read

Four pages that state what happens the moment the file is opened: which page it opens on and how much of the window that page fills, the bookmarks shown beside it, the pages two at a time, a print dialogue already filled in, and the address its relative links are read against.

None of what this document states changes a single mark on its pages. It changes what happens the moment somebody double-clicks the file: which page it opens on, how much of the window that page fills, whether the bookmarks stand beside it, and whether the pages are shown one at a time or two.

It also fills in the print dialogue in advance — which pages, whether both sides, how many copies — and gives the address the document's relative links are read against. For a handbook, a catalogue or anything that has to open the same way every time, this is the difference between a file and a document.

What this example shows

  • The page it opens on, how far it is zoomed, and what stands beside it.
  • Two-up spreads with the cover on its own.
  • A print dialogue that comes up already set.

The code, in full

The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.

The document itself

The document this example writes, ready to open.

Open the document in English

Read the Rust source Read the Python source

First page of A handbook that says how it wants to be read

What this document weighs

Before 116,738 bytes
Now 46,471 bytes
Saved 60.2 %

Not one mark on the page changed. See every document measured.

Examples near this one

A slideshow that runs itself

Thirteen slides, each stating the effect it arrives by — all twelve the standard defines — how long that effect takes and how long the slide stands before the next one comes. The file opens full screen, which is the only place a reader reads any of it.

Links and marks on placed text

Links and marks hung on text the engine has already placed: a band behind a line, an underline, a boxed cell — every rectangle taken from what the layout and the table report afterwards, none of it measured by hand.

A sheet that measures what it says

Three rules — centimetres, inches and points — on a page that states it must print at exactly the size it was drawn, and that the reader is to offer nothing else. That second request only exists from PDF 2.0 on, so the file declares 2.0 rather than changing version without you knowing.

A register whose every part says where it came from

Two sittings bound into one file. Each page carries a record of its own — what it is, whose hand wrote it, when — the photograph on the second page carries one too, and each transcription is tied to the page it transcribes rather than to the file at large. Tying an attached file to anything but the whole document only exists from PDF 2.0 on, so the file declares 2.0.

Every example, by subject