A Minimal PDF
Two identical pages that draw the structure of an invoice with lines and rectangles, without a word of text: the file is about a dozen kilobytes and embeds no font.
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 who can unlock it goes in. A PDF has both, and the document below is the street door. Open it and you are asked for a password; until something correct is typed there, the reading software 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 way in 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.
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 Open the document in German Open the document in Spanish Open the document in Italian Open the document in Portuguese
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.
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 reading software 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”.
A password adds no chapter to a document: it weighs what the same page weighs unlocked. See the size of every example document.
Two identical pages that draw the structure of an invoice with lines and rectangles, without a word of text: the file is about a dozen kilobytes and embeds no font.
The same document written twice: once as it is, once with its first page placed at the start of the file. The page gives, for each of the two, the number of bytes a browser must have received before it shows page 1.
One page for each paper size the library names, from A0 down to A6 and the American sizes, each giving its size in millimetres and inches; then pages laid on their side or upside down, and a banner ten metres long.
One document written twice: once uncompressed, once compressed. The page gives both file sizes and what the compression saved.
A page that opens without a password and prints like any other, but asks the reading software to forbid copying and pasting its text. The text is encrypted in the file: a program reading it byte by byte finds no sentence in it.
Text set in a font embedded in the file, cut down to the letters actually used, and still searchable, copyable and readable aloud.