A document that reads freely and asks not to be copied

Think of a price list left on the counter of a shop. Anybody may pick it up, read it and take it home: that is what it is there for. What you would rather not see is your own paragraphs turning up word for word in somebody else's brochure a fortnight later. The file below is that price list. It opens for everybody, and it carries a written request that its text be left alone.

A PDF can carry two passwords, and they do two different jobs. One is asked for before the document opens at all, and this document has none: the page is simply there, and it prints. The other is asked of nobody — it lifts the restrictions written into a document anybody can already read, and on a closed document it opens that one as well. What this one carries is that second password, and a written request with it: do not let this text be copied, do not let it be altered. See the request for yourself, it takes five seconds. Open the document with the button on this page, right-click on a line of its text, and look at the menu that comes up. In Chrome the “Copy” entry is greyed out and pressing it does nothing: Chrome read the request and did as it was asked. In the reading software built into Firefox the same right-click copies the sentence like any other: Firefox read the request and went on regardless. Neither program is broken, and that is the whole point. The document asks; each piece of software answers for itself. It is the rope across a museum doorway, not the door of a safe.

What this example shows

  • It opens with nothing typed, in any reading software, and prints like any other document.
  • What it asks of the reading software: printing and reading aloud yes, copying and altering no — and what each program does with that, which is not the same in Chrome as in Firefox.
  • Every word of it scrambled inside the file, so nothing that reads the file straight through finds a sentence.

The source code, complete

Nothing is left out and nothing is simplified: this is the program exactly as it runs, for the developer who uses this library. The third is the description itself: a plain list of what the page has to say, which is what the service is sent.

Read the Rust source Read the Python source Read the JSON source

The document itself

Open the document in English Open the document in French

The other document of this pair

The other one is the door most people mean when they say a PDF is protected: it asks for a password before it shows anything at all. That one is nobody's request — without the password, not a line is readable. Its page carries the file and the password to try it with.

A document that asks for a password before it opens

A document that reads freely and asks not to be copied, first page

This document weighs 13.4 kB

Scrambling a document adds no chapter to it: it weighs what the same page weighs unscrambled. See the size of every example document.

Examples near this one

A minimal PDF

Two identical pages carrying the bones of an invoice in plain shapes, and not a word of text: a file of a dozen kilobytes, with no font embedded.

Making the file smaller

The same document written twice, plainly and packed, with what each one weighs and what the packing saved.

Fonts embedded in the file

Text set in a font embedded in the file, cut down to the letters actually used, and still searchable, copyable and readable aloud.

Letters you draw yourself

A tick, a cross and a dash drawn by the program, added to the document as a font, and set among ordinary words.

Every example, by subject