PDFPipe

Who the document is between / Multi-party block

Three or more parties on one document without a wall of addresses

A document between more than two parties, where each needs identifying and the relationship between them has to be clear.

Why this block is harder than it looks

Two parties fit side by side. Three or more do not, and the usual response is a third column, which drops each block to about 50mm and truncates the addresses. The deeper problem is that with more than two parties, who they are to each other stops being obvious: a document naming a seller, a buyer, a guarantor and an agent needs to say which is which, and a grid of four equal address blocks says nothing about the relationship. The layout has to carry the roles as loudly as the names.

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.

  • Go to a two-column grid with rows rather than a row of three or four columns. Four parties as two rows of two keeps every block readable.
  • Lead each block with the role, set as a label above the name, and make the role more prominent than a caption would be. It is the field a reader is looking for.
  • Give the principal parties the first row and secondary ones such as an agent or a guarantor the second, so the reading order carries the hierarchy.
  • Trim the secondary blocks to name, role and one identifier. A guarantor rarely needs a full postal address in the same weight as the buyer.
  • Keep the grid rows aligned with align-items: start so a long address in one block does not push its neighbour down.
  • Where the relationship is not obvious from the roles alone, state it in one sentence under the grid rather than trying to draw it.

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
<section class="parties-grid">
  <div class="party">
    <p class="role">Supplier</p>
    <p class="name">Wynne and Hall Ltd</p>
    <p class="detail">Unit 4, Callow Works, Sheffield S3 8NP</p>
  </div>
  <div class="party">
    <p class="role">Customer</p>
    <p class="name">Fenwick Group plc</p>
    <p class="detail">14 Marsden Row, Leeds LS1 4QT</p>
  </div>
  <div class="party secondary">
    <p class="role">Guarantor</p>
    <p class="name">Fenwick Holdings BV</p>
    <p class="detail">Registered no. 88104471</p>
  </div>
  <div class="party secondary">
    <p class="role">Agent</p>
    <p class="name">Marsden Contract Services</p>
    <p class="detail">Acting for the Customer</p>
  </div>
</section>

<style>
  .parties-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;      /* two columns, more rows */
    gap: 8mm 12mm;
    align-items: start;
    break-inside: avoid;
    margin: 12pt 0;
  }
  .parties-grid .role {
    margin: 0 0 2pt;
    font-size: 7.5pt;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
  }
  .parties-grid .name { margin: 0; font-weight: 700; font-size: 10pt; }
  .parties-grid .detail { margin: 2pt 0 0; font-size: 8.5pt; line-height: 1.35; color: #444; }
  .parties-grid .secondary .name { font-weight: 600; font-size: 9.5pt; }
</style>

What breaks when it is built the obvious way

Adding a third and fourth column to the two-party layout. Each block loses half its width, the addresses wrap to five lines, and the block that was readable at two parties is unreadable at four. Adding a row costs vertical space and keeps everything legible.

How to prove it survived pagination

Render with four parties where one has a five-line address and one has a single line. The blocks should start on the same line within each row, the roles should be immediately readable, and no address should have wrapped mid-word.

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 services agreement 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.