An agreement received and added to without a byte moved

A supplier sends a maintenance agreement as a PDF of two pages. It has to go back with a signature area, the date, a line saying who signs, and an annex of one page at the end. Opening the agreement and writing it out again would give back a different file: a signature it already carried would no longer hold, and nobody could prove the wording is still the one that was sent.

So nothing of the agreement is rewritten. What is added is created as a document of its own: its first page is laid over the agreement's last page, and its second page is added after it. The file that comes out is the agreement exactly as it arrived, followed by a section holding what was added, and a reader that shows a file's earlier versions still shows the agreement as it was received.

What this example shows

  • Every byte of the received file left where it was.
  • A page's worth of additions laid over a page that already exists.
  • A page added at the end, counted like the others.

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

Examples near this one

The watermark a trial copy carries

What you get before you pay anything: a watermark across every page, and the same pages under it, laid out exactly as a paid copy lays them out. This is also the document that says what a licence key changes, and why every figure on this site is measured with one.

An interactive form

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

A document signed with a demonstration certificate

A page carrying a digital signature that any change to the file breaks, made with a certificate that exists only for the demonstration. Every command that made the key and the signature is printed on the page, with the one that checks it without this library.

Every example, by subject