An Invoice Laid on a Letterhead Template
Every customer has their own letterhead, and not one of them will send you the fonts, the logo file and the exact colour it was printed in. What they will send is a PDF of it. Rebuilding that letterhead by hand means it comes out nearly right — on every document you create for them, for as long as they are a customer.
So their own page does the work. It is laid down exactly as it stands — its fonts, its colours, its logo, just as they are in the file they sent you — and the invoice is written on top of it. Their letterhead therefore still looks like their letterhead, and their fonts and their colour come with it.
The letterhead is then read back off its own page: each run of its text, where it begins and the size it is set in, printed under the invoice. A run whose letters the file gives no way of reading is reported as unread, never guessed.
What This Example Shows
- A template read once and reused as it stands.
- Its fonts and colours carried over untouched.
- New content composed on top of the page it lays down.
- The template's text read back, with where each run begins.
The Source Code, Complete
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 Itself
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