PDFPipe

Legal and awards / A6

Warranty card PDF template

A postcard-sized card that goes in the box, stating the term, the fields the owner fills in, and what the warranty does and does not cover.

When this document is the right one

A product ships. The card is printed months before it is filled in, by someone standing over an open box, which is why the fields are ruled and short.

Why each part is there

The fields are visible in the markup. What is not visible is why they are present, which is the part that gets removed first when someone adapts a template for their own use.

  • The term as a large number with its unit, since that is the one thing the owner will look at.
  • Serial number and purchase date as ruled fields, because a claim is assessed on both and neither is knowable from the card alone.
  • A statement that the card is not proof of purchase, so the owner keeps the invoice rather than relying on this.
  • What is covered and what is not, as two clearly separate blocks. A single paragraph mixing them is read as coverage.
  • The exclusion that identifies tampering, since that is the exclusion most often argued about.

The template

A complete file. Doctype, stylesheet, body: paste it into a renderer unchanged and it produces a finished A6 page. Replace the sample data and the styling holds.

html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Warranty card, DPT-200</title>
<style>
  /* A6, so it prints four to an A4 sheet and fits in the box on top of the
     product without being folded. */
  @page { size: 105mm 148mm; margin: 8mm; }
  * { box-sizing: border-box; }
  body { margin: 0; height: 132mm; font: 8.5pt/1.4 Arial, sans-serif; color: #111;
         display: flex; flex-direction: column; }

  header { border-bottom: 2px solid #111; padding-bottom: 3mm; }
  .brand { font-size: 11pt; font-weight: 700; letter-spacing: -0.01em; }
  h1 { margin: 2mm 0 0; font-size: 12pt; text-transform: uppercase; letter-spacing: 0.1em; }

  .term { margin: 4mm 0; text-align: center; }
  .term .n { font-size: 26pt; font-weight: 700; line-height: 1; }
  .term .u { font-size: 8pt; text-transform: uppercase; letter-spacing: 0.1em; color: #666; }

  /* The fields the owner has to fill in. Ruled and labelled, because a blank
     box on a card this size gets one illegible scrawl. */
  dl { display: grid; grid-template-columns: 26mm 1fr; gap: 0 3mm; margin: 0; }
  dt { font-size: 7pt; text-transform: uppercase; letter-spacing: 0.06em; color: #666;
       align-self: end; padding-bottom: 1mm; }
  dd { margin: 0 0 3mm; border-bottom: 1px solid #999; min-height: 6mm; }

  .covers { margin-top: auto; font-size: 7.5pt; line-height: 1.35; color: #333;
            border-top: 1px solid #ddd; padding-top: 3mm; }
  .covers strong { display: block; margin-bottom: 1mm; color: #111; }
  .covers .not { margin-top: 2mm; }
</style>
</head>
<body>
  <header>
    <div class="brand">Anantha Instruments</div>
    <h1>Warranty</h1>
  </header>

  <div class="term">
    <div class="n">24</div>
    <div class="u">months from purchase</div>
  </div>

  <dl>
    <dt>Model</dt><dd>DPT-200</dd>
    <dt>Serial number</dt><dd></dd>
    <dt>Date of purchase</dt><dd></dd>
    <dt>Dealer</dt><dd></dd>
    <dt>Owner</dt><dd></dd>
  </dl>

  <div class="covers">
    <strong>What this covers</strong>
    Defects in materials and workmanship under normal use. We will repair or replace
    the unit at our option. Keep the purchase invoice: this card on its own is not
    proof of the purchase date, and a claim without a date starts from the
    manufacturing date on the serial number instead.
    <div class="not">
      <strong>What it does not cover</strong>
      Damage from over-pressure, incorrect wiring, immersion or impact. Consumable
      seals. Units opened by anyone other than an authorised service centre, which is
      identifiable because the case seal is destroyed by opening.
    </div>
  </div>
</body>
</html>

The layout decision worth understanding

A6, so four print to an A4 sheet and the card fits in the box on top of the product without folding. The fill-in fields are ruled with a labelled column rather than being an empty box: at this size a blank rectangle attracts one illegible scrawl across the middle of it.

The mistake people make adapting it

Writing the exclusions as a wall of small print at the bottom. It is the section most likely to be relied on and least likely to be read, and a warranty dispute where the customer can honestly say they never saw the exclusion is a dispute you lose in every forum that matters.

Rendering it

The page box is declared in the template's own CSS as A6, so the size travels with the markup rather than living in the code that calls the renderer. A6 is not one of the six named formats the API accepts, so set prefer_css_page_size on the request and the renderer will use the page box the document declares.

bash
curl -X POST https://api.pdfpipe.xyz/v1/pdf \
  -H "Authorization: Bearer $PDFPIPE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<!doctype html>...",
    "options": { "prefer_css_page_size": true }
  }' \
  --output warranty-card.pdf

Frequently asked

Can I use this template commercially?

Yes. Copy it, change it, ship it. It is sample markup written to be taken, and the sample data in it is invented, so replace the names and the numbers before anyone sees it.

Why is the page size in the CSS rather than in the API call?

Because a warranty card is a A6 document, and that is a property of the document rather than of the code that renders it. Declaring it in the page box means the size cannot be lost between the template and the call, which is the usual way a document ends up on the wrong paper.

Will it look the same in every renderer?

The layout will, because it uses ordinary CSS. The page break behaviour will not: break-inside and break-after are implemented differently by browser engines and by dedicated print engines, and some of the paged media specification is not implemented in browser renders at all. That difference is documented per property in the paged CSS reference.

Other templates

Documents from the same part of a business, and one from each of the other groups.

Paste the template into the playground and get the PDF back. No signup, no key.