PDFPipe

Signing, terms and clauses / Legal footer notice

A company registration footer that repeats on every page

Registered company name, number, registered office and any regulatory statement, set small at the foot of every page because it has to be on every page.

Why this block is harder than it looks

This block is required, it is required on every page, and it is required to be legible, and those three requirements conflict with the fact that nobody wants to spend vertical space on it. The usual outcome is a single line of 6pt grey text jammed against the bottom margin, which satisfies the letter of nothing. The layout question is how to fit a two-line statement into a page footer without either shrinking it past legibility or eating the text block.

The decisions that make it work

Reasons rather than a description of the code. Each of these is a choice that has a wrong answer, and the wrong answer is usually the default.

  • Put it in the page's bottom margin box rather than in the flow, so it repeats without the content having to know about it and without consuming text-block height.
  • Reserve the space in the page margin rather than overlaying it. A footer that overlaps the last line of body text on long pages is the failure this causes.
  • Keep it at 7pt or above and in a colour that is genuinely readable rather than a light grey chosen to make it disappear.
  • Allow it two lines and set the line height tight, rather than forcing one long line that has to be shrunk to fit the measure.
  • Separate the registration details from the page number: they are different information and putting them in the same margin box makes both harder to find.
  • Do not centre a long statement. Centred small text at the foot of a page is read less than left-aligned small text, and the left edge gives the eye somewhere to start.

The fragment

Markup and the CSS it needs, and nothing else. It expects a document that already has a page rule and a base stylesheet, so paste it into one rather than opening it on its own.

html
<style>
  @page {
    size: A4;
    margin: 22mm 20mm 26mm;        /* bottom margin sized for the notice */

    @bottom-left {
      content: "Wynne and Hall Ltd, registered in England and Wales "
               "no. 04182266. Registered office: Unit 4, Callow Works, "
               "Bridge Street, Sheffield S3 8NP.";
      font-size: 7pt;
      line-height: 1.25;
      color: #666;
      text-align: left;
      width: 130mm;                /* wraps to two lines rather than shrinking */
      vertical-align: bottom;
    }

    @bottom-right {
      content: counter(page) " of " counter(pages);
      font-size: 7.5pt;
      color: #666;
      vertical-align: bottom;
    }
  }
</style>

What breaks when it is built the obvious way

Setting the notice as a fixed-position block instead of a page margin box. Fixed blocks sit on top of the content rather than beside it, so on any page whose text reaches the bottom margin the notice prints over the last line, and it does so only on the pages that are full.

How to prove it survived pagination

Render a document long enough to have one page filled to the bottom margin and confirm nothing overlaps. Then read the notice at actual size at arm's length: if you cannot, it does not matter that it is present.

Where it sits in a finished document

This page is one block. The document it belongs to has a page rule, a base stylesheet, a header and everything else around it, and repeating all of that here would make thirty pages that say the same thing. The business letter template is a complete file with this block already in it, so take that and change the fragment rather than assembling one from parts. The property doing most of the work here is covered on its own page, with the support caveats that belong there rather than here.

Frequently asked

Will this fragment work on its own?

Not as a whole document. It has no page rule, no margins and no base type, because those belong to the document rather than to the block, and duplicating them in every fragment would mean thirty copies to keep in step. Paste it into a template that already has them.

Why does it look right in a browser and wrong in the PDF?

Because a browser window is one continuous surface and a document is a stack of fixed rectangles. Nothing in a scrolling view exercises a page boundary, so every break rule in the fragment is inert until the content is paginated. Render the real thing with enough content to cross two or three boundaries, then look.

Do I need a special option on the render request for this?

No. Everything on this page is CSS and markup, which is your side of the boundary. What the render has to give you is a real page size with real margins, and after that the layout is decided by the stylesheet.

Other parts of a document

The blocks that sit next to this one, and one from the next group along so you are not sealed inside a single kind of problem.

Paste the fragment into the playground inside a page rule and see what it does at a real page size. That is the only way any of this gets confirmed.