A document that asks for a password before it opens

Picture a building with two doors. The street door is the one without which nobody gets in at all, and nobody sees what is inside. The door of the office at the far end of the corridor is the other one: everybody walks past it, and only the person with that key goes in. A PDF has both, and the document below is the street door. Open it and a box appears asking for a password; until something correct is typed there, the reader shows an empty window.

Nothing sees inside it, and that is the whole point: no preview in the file manager, no first page in the search results of your machine, no small picture of it anywhere — which is why this page has no picture of it either. Send it as an attachment and the same holds all the way along: whoever is handed it by mistake holds a file and nothing else. That is the form used for a payslip sent by e-mail, for a bank statement, for a medical report. The file travels, and the password travels another way. And there is no back door: nobody here, and nobody who wrote your reading software, can open it for you. The one other key is the author's password, which a document may also carry; this one carries it, and prints it on its own page beside the first, because it is an example written to be looked at.

What this example shows

  • The password it asks for, typed into your reader's own box exactly as it is written here, letter for letter and with the space in the middle: “the reader”.
  • Nothing shows a page of it without that password: not your file manager, not the search of your machine, not this page.
  • Every word of it scrambled inside the file, and the key worked out from the password, which is written nowhere in the file.

The code that writes it, in full

Whole programs, hundreds of lines long, for whoever writes your software.

Read the Rust source Read the Python source

The document itself

Open the document in English Open the document in French

The other document of this pair

The other one opens for everybody with nothing typed, and asks the reading software not to let its text be copied or altered. That is a request and not a lock: software that pays no heed to it copies the page all the same. It is the one most documents calling themselves protected actually carry.

A document that reads freely and asks not to be copied

There is no picture of this document to show here: nothing draws a page of it until its password is typed in, and that is what it is for. Open it and your reader will ask you for one. Type it exactly as it is written here, letter for letter and with the space in the middle: “the reader”.

What this document weighs

This document weighs 40.7 kB.

A password adds a key to a document, not a chapter: it weighs what the same page weighs unlocked. See what every document weighs.

The speed and weight figures on this site are measured with a licence key. See what a trial copy draws.

Details for technical readers

Exactly 40 675 bytes.

A kilobyte on this site is a thousand bytes.

Examples near this one

A minimal PDF

Two identical pages carrying the bones of an invoice in plain shapes, and not a word of lettering: the smallest file there is, and it opens anywhere.

Making the file smaller

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

Fonts kept inside the file

Text set in a typeface the file carries inside it, 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