PDFPipe

Getting paid / Payment terms line

Payment terms and due date that cannot be missed or misread

The line that says when the money is due and what happens if it is not, which is short, easy to write and easy to place somewhere nobody reads.

Why this block is harder than it looks

Terms are usually expressed relatively, as thirty days net, and a relative term requires the reader to do arithmetic from a date they have to find elsewhere on the page. That is the whole problem: every step between reading the term and knowing the date is a step where the invoice gets put in a pile. The layout question is where a single short line goes so that it is seen, in a document whose visual weight is all in the table and the total, and the answer is usually not in the footer with the small print.

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.

  • Print the absolute due date, computed, in addition to the relative term. Due 13 April 2026 is actionable, thirty days net is homework.
  • Put it adjacent to the total rather than in the footer. The total is where the eye lands, and a due date twelve millimetres away is read at the same time.
  • Set the date at the same size as the total's label or larger. A due date at 7pt in the footer is a due date that was not communicated.
  • State the late-payment consequence separately and once, in the terms block, not attached to the due date. Mixing the deadline and the penalty in one sentence makes both harder to read.
  • Use an unambiguous date format with the month as a word. Numeric dates are read differently in different places and this is not the field to be ambiguous about.
  • Keep the line unbreakable. A due date wrapped between the day and the month is genuinely misread.

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="terms-line">
  <span class="label">Payment due</span>
  <span class="date">13 April 2026</span>
  <span class="rel">(30 days from invoice date)</span>
</div>

<style>
  .terms-line {
    break-inside: avoid;
    margin-top: 8pt;
    padding-top: 6pt;
    border-top: 0.5pt solid #ccc;
    white-space: nowrap;            /* never split a date */
  }
  .terms-line .label {
    font-size: 8pt;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #555;
    margin-right: 6pt;
  }
  .terms-line .date { font-size: 11pt; font-weight: 700; }
  .terms-line .rel  { font-size: 8.5pt; color: #555; margin-left: 4pt; }
</style>

What breaks when it is built the obvious way

Printing only the relative term because the due date is computed downstream. It saves one line of code and moves the calculation onto the person you are asking for money, which is exactly the wrong direction.

How to prove it survived pagination

Cover everything on the rendered page except the top third and ask somebody when the money is due. If they have to hunt, the line is in the wrong place. Then check the computed date against the invoice date and the term, because an off-by-one in date arithmetic is invisible on inspection.

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 payment reminder 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.