A pack built on three supplied sheets

A supply agreement standing on three PDF files the customer sent: a headed sheet under the front page, a plain sheet under every page the schedule runs to, and a page of conditions that goes in whole.

A customer sends their own paper as PDF files: the sheet with their name and address at the top, a plain sheet for the pages that follow, and the page of conditions they always attach. This example writes a supply agreement on all three. The first page sits on the headed sheet, the pages the schedule runs to sit on the plain one, and the page of conditions goes in exactly as it arrived — numbered like every other page, because it is one.

None of the three files is redrawn. The team reads each one, takes its page in as a drawing, and puts the new text on top. So the customer's letterhead comes out of the printer looking as they made it, and the conditions they signed are the ones on file, word for word. How many pages the plain sheet is needed for is not decided in advance: the table of deliveries says how many pages it takes, and the pack is that long.

What this example shows

  • Three separate PDF files read and used as they stand.
  • One sheet repeated behind however many pages the table needs.
  • A supplied page kept whole, and counted as a page of the document.

The code, in full

The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.

The document itself

The document this example writes, ready to open.

Open the document in English

Read the Rust source Read the Python source

First page of A pack built on three supplied sheets

What this document weighs

This document weighs 171,243 bytes.

The team wrote this example after measuring the documents above, so there is no earlier figure to set beside it. See every document measured.

Examples near this one

The evaluation watermark

What an unlicensed copy looks like: the evaluation watermark the library stamps on every page.

An interactive form

A form a reader fills in: text boxes, a check box, a drop-down, radio buttons.

An archivable PDF/A-3 form

A form that is also a PDF/A-3 file: every field already drawn, with a visible frame, expecting nothing from the reader's software.

A tagged, accessible document

A document that says what each run of ink stands for, and which runs are only trimmings. Its text and its table describe themselves, a paragraph and a cell at a time. Validates as PDF/A-3a and PDF/UA-1.

A tagged list whose column is a picture

A parts list whose first column is a picture rather than a word. Each picture is marked as one and carries the words a reader hears in its place, so nothing in the list is lost on somebody who cannot see it. Validates as PDF/A-3a and PDF/UA-1.

Every example, by subject

Glossary

signature
A seal inside the document that proves two things at once: who approved it, and that not one byte has changed since. A reader shows it as a banner at the top of the page.