Four Personal Letters, One File for the Press
A concert hall sends its renewal letters: thousands of pages that are all the same letter, with only the name, the seat and the amount changing. Sent to a press as thousands of separate files, or as one file with nothing in it but pages, the run slows down: the press works out the same letterhead again for every page, and nothing tells it where one letter ends and the next begins.
This example writes four such letters into one file the way a press for variable-data printing expects. Each letter is a part of its own, which states its recipient, member number, postcode and amount due, so the press knows where one letter ends and the next begins. The letterhead and the note at the foot of the page are one shared object, placed on every page and marked so that a press can work it out once and keep it for the whole run.
The standard for such files, PDF/VT, rests on PDF/X-4, which needs the colour profile of the press the run is printed on. The library has no profile of its own to give, so the copies shown here claim no standard and say so at the foot of each page; hand the program your printer's profile and the same file claims PDF/VT-1.
What This Example Shows
- One layout, four letters: only the name, the seat and the amount change.
- Each letter a part of its own, its recipient's details stated for the press.
- A letterhead a press can work out once for the whole file.
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.
Read the Rust source
Read the Python 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