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.
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.
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
Open the document in English Open the document in French
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.
Scrambling a document adds no chapter to it: it weighs what the same page weighs unscrambled. See the size of every example document.
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.
The same document written twice, the ordinary way and with its first page moved to the head of the file, with how much of each must arrive before page one appears.
The same document written twice, plainly and packed, with what each one weighs and what the packing saved.
A page nothing shows until its password is typed in: no first line, no preview, no picture of it anywhere. The password is given on the example's page, to be tried.
Text set in a font embedded in the file, cut down to the letters actually used, and still searchable, copyable and readable aloud.
A tick, a cross and a dash drawn by the program, added to the document as a font, and set among ordinary words.