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 file that must carry every font it uses — an invoice kept for ten years, a file sent to a printer — cannot lean on the fourteen fonts all reading software holds. The library carries in their place free fonts drawn to the same widths, so a line keeps its length and your layout does not move.
This document shows all twenty-six, one page each, the way a type foundry shows its fonts: the name, the built-in font whose widths it takes and its licence; one line at eight sizes, from 8 to 48 points; the same line in the built-in font and then in the free one, with the width each measures; and every character the font shows.
The last page sets two stamps and two notes in built-in fonts. For each, the file carries the free font of the same widths, so every reading software shows the same letters.
Nothing is left out and nothing is simplified: this is the program exactly as it runs, for the developer who uses this library.
Read the Rust source Read the Python 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.