PDFPipe

Signing, terms and clauses / Approval chain

A prepared, checked and approved block that fits on one line

Three or four named roles with a signature space, a date and sometimes a stamp, showing who produced a document and who released it.

Why this block is harder than it looks

An approval chain is several signature blocks side by side, which brings the signature block's page-break problem and adds a width problem on top of it. Four columns on a portrait page leaves about forty millimetres each, which is narrower than most people sign, and the names and roles underneath are longer than the space. The usual response is to shrink the type until the roles fit, which produces a row of illegible labels under boxes too small to sign, and the block then fails at the one thing it exists for.

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.

  • Cap the number of columns at three on a portrait page. A fourth role goes on a second row rather than into a narrower column.
  • Size the signing box for a real signature, at least 35mm wide and 12mm tall, and let the layout follow from that rather than the other way round.
  • Put the role above the box and the name below it. The role is what the reader is looking for, and it should not be competing with the signature for space.
  • Wrap the whole chain in a break-inside: avoid container together with the sentence that precedes it, exactly as with a single signature block.
  • Give the date its own narrow box beside each signature rather than expecting it to be written inside the signing space.
  • Where a role may be unfilled, print the box anyway with the role labelled. An approval chain missing a column reads as a document with a step removed rather than a step not yet done.

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
<div class="approvals">
  <p class="intro">Issued under the quality procedure in force at the date below.</p>
  <div class="chain">
    <div class="slot">
      <p class="role">Prepared by</p>
      <div class="sign"></div>
      <p class="who">E. Wynne</p>
      <div class="date"><span>Date</span></div>
    </div>
    <div class="slot">
      <p class="role">Checked by</p>
      <div class="sign"></div>
      <p class="who">R. Hall</p>
      <div class="date"><span>Date</span></div>
    </div>
    <div class="slot">
      <p class="role">Approved by</p>
      <div class="sign"></div>
      <p class="who">M. Ferris</p>
      <div class="date"><span>Date</span></div>
    </div>
  </div>
</div>

<style>
  .approvals { break-inside: avoid; margin-top: 16pt; }
  .chain {
    display: grid;
    grid-template-columns: repeat(3, 1fr);   /* three, never four, on portrait */
    column-gap: 10mm;
    margin-top: 10pt;
  }
  .slot .role {
    margin: 0 0 3pt;
    font-size: 7.5pt;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #555;
  }
  .slot .sign {
    height: 14mm;                          /* sized for a pen */
    border-bottom: 0.75pt solid currentColor;
  }
  .slot .who { margin: 3pt 0 0; font-size: 9pt; font-weight: 600; }
  .slot .date {
    margin-top: 6pt;
    height: 9mm;
    border-bottom: 0.5pt solid #999;
    font-size: 7pt;
    color: #777;
  }
</style>

What breaks when it is built the obvious way

Fitting four or five roles across a portrait page by shrinking everything. The result is a row of boxes nobody can sign under labels nobody can read, and the document is then approved by initials squeezed into a corner, which defeats the audit trail the block exists to create.

How to prove it survived pagination

Print it and have three different people sign the three boxes with their normal signatures. If any signature crosses into the next column, the boxes are too narrow. Then push the block near a page break and confirm the intro sentence travels with it.

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 inspection checklist 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.