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.
A bank that prints two million statements a night pays for every byte twice over: once on the disc the run is kept on, once on the network it travels down. A letter is normally written into a file as a pair of bytes, because that is what it takes to reach any letter of any alphabet on earth. A statement in French needs a hundred or so of them, and the second byte is a nought on every single letter of the run.
Told to, the engine settles a number of its own for each letter a document uses, writes the list of them into the file so reading software knows what it is looking at, and then spends one byte a letter instead of two. The page shows the three lines drawn both ways and prints what each way came to, counted as the page was drawn. It ends on what the short way buys besides room: the space between words becomes something a document can widen, which is how justified text is set, and which the long way has no way of reaching. A last line, in Cyrillic, goes through a table of one-byte codes named by its standard, Windows code page 1251, which reading software already knows.
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
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.
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.