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.
Send a document to somebody who does not have your house font and one of two things happens: their reading software quietly puts another one in its place and your layout moves, or it draws empty boxes where the letters were. Carrying the font inside the file is the only cure, and it is the first thing a commercial printer will ask you for before accepting the job.
Carrying the whole font would be wasteful — it has thousands of shapes in it and a letter uses a few dozen — so the file takes only the ones it draws. That is the easy half. The hard half is that the words have to come back out: select a sentence in the finished document, copy it, search it, or have it read aloud, and it must still be words rather than a picture of words. The file therefore carries a small list saying which letter each drawn shape stands for, and the team pulls the text back out of the published file to make sure it does.
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
The document is lighter than it was, and every page still looks exactly the same. See this document's row in the table of every example.
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 that opens with nothing typed and prints like any other, and that asks the reading software to leave its text where it is. Every word of it is scrambled inside the file.
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.
A tick, a cross and a dash drawn by the program, added to the document as a font, and set among ordinary words.