PDFPipe

Signing, terms and clauses / Warranty terms block

A warranty block that states its period, start and limits together

What is warranted, for how long, from when, and what voids it, printed as one block on a warranty card or the back of a certificate.

Why this block is harder than it looks

A warranty is four facts that are useless apart: the cover, the period, the start point and the exclusions. Documents routinely print the period prominently and bury the start point, so a twelve month warranty is printed without saying twelve months from what, and delivery, installation and invoice date can be weeks apart. The layout problem is that these four have different lengths, one of them is a list, and setting them as flowing prose makes all four equally hard to find at the moment somebody needs them.

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.

  • Set the period and its start point on one line together. A period alone is not a fact, and separating them is the most common failure in this block.
  • Put the four elements in labelled parts, not in a paragraph. This block is read under pressure by somebody with a broken thing.
  • Make the expiry date explicit where it can be computed, alongside the period. A date beats a duration for the reader.
  • Set the exclusions at the same size as the cover, for the same reason exclusions lists are set at the same size as inclusions.
  • Keep the block together with break-inside: avoid. Cover on one page and exclusions on another is a dispute.
  • Print the serial or reference the warranty attaches to inside the block, since a warranty that cannot be tied to an item is not claimable.

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="warranty">
  <dl>
    <dt>Covers</dt>
    <dd>Parts and labour on the unit identified below, for faults arising in
      normal use.</dd>
    <dt>Period</dt>
    <dd><strong>24 months from delivery</strong>, expiring 14 March 2028.</dd>
    <dt>Item</dt>
    <dd class="ref">Pump assembly 40mm, serial AX-4471-0091</dd>
    <dt>Not covered</dt>
    <dd>
      <ul>
        <li>Damage from installation not carried out to the published method.</li>
        <li>Consumable parts, including seals and filters.</li>
      </ul>
    </dd>
  </dl>
</section>

<style>
  .warranty { break-inside: avoid; font-size: 9pt; }
  .warranty dl {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10pt;
    row-gap: 5pt;
    margin: 0;
  }
  .warranty dt { color: #555; white-space: nowrap; }
  .warranty dd { margin: 0; line-height: 1.45; }
  .warranty ul { margin: 0; padding-left: 14pt; }
  .warranty li { margin-bottom: 2pt; }   /* same size as the cover text */
  .warranty .ref {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    white-space: nowrap;
  }
</style>

What breaks when it is built the obvious way

Printing the period without its start point. Twelve months from what is the first question every claim asks, and a document that does not answer it turns a routine claim into a negotiation about the date of delivery.

How to prove it survived pagination

Cover everything but the block and ask when the warranty expires. If the answer needs another document, the start point or the expiry date is missing. Then confirm the serial number is inside the block rather than elsewhere on the page.

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 warranty card 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.