PDFPipe

Labels / 89 x 36 mm address label

89x36mm address label PDF size

89 by 36 millimetres, or 3.5 by 1.4 inches, is the standard single address label on a desktop label printer.

The dimensions

One measurement in four units. Millimetres and inches are what a printer works in; points are what the PDF itself stores; pixels are only useful for checking a screen mock-up against the real thing.

  • Millimetres: 89 x 36 mm
  • Inches: 3.5 x 1.42 in
  • Points: 252 x 102 pt
  • CSS pixels: 336 x 136 px at 96 dpi

Where the size comes from

The size was set by desktop label printer media and it has stayed fixed for decades because the address block it holds has not changed: four to five lines at a readable size, in the width a domestic envelope window allows. It is the label most often produced one at a time, on demand, rather than in a batch.

What gets printed at this size

  • envelope address labels printed as mail is prepared
  • file and folder spine labels
  • asset tags and small equipment labels

Margins that survive a real printer

1.5mm. There is almost nothing to spare: a five line address at 9pt with normal leading occupies about 30mm of the 36mm height. Set the line height explicitly rather than letting it default, because the difference between 1.2 and 1.4 is a whole line on a label this size.

The CSS

89 x 36 mm address label is not one of the six named formats the API accepts, so the size has to come from the document. Declare it in the page box and set prefer_css_page_size in the request.

css
@page {
  size: 89mm 36mm;
  margin: 1.5mm;
}

body {
  margin: 0;
  font-size: 9pt;
  /* Tight and explicit. A default line height loses a line here. */
  line-height: 1.15;
}

address {
  font-style: normal;
  /* An address that overflows must be visibly wrong rather than
     silently clipped, so nobody posts a parcel with half a postcode. */
  overflow: hidden;
}

The render request

With a custom size the options carry no format at all: the one flag tells the renderer to use the page box the document declares.

json
{
  "html": "<!doctype html>...",
  "options": {
    // No named format. The page box in the document's own CSS is the
    // size, and this flag is what tells the renderer to use it.
    "prefer_css_page_size": true
  }
}

The mistake people make

Letting a long address wrap into a sixth line that falls off the bottom. Nothing errors, the label prints, and the postcode is missing. Cap the address at the number of lines that fit and fail loudly above that.

Frequently asked

What is 89 x 36 mm address label in pixels?

336 x 136 px at 96 dpi, at the 96 pixels to the inch that CSS assumes. That number is useful for comparing a screen mock-up against the page, and useless for laying out the document: use 89 x 36 mm instead, because a page laid out in pixels shifts whenever the render scale changes.

Can I pass 89 x 36 mm address label as a format?

No. The API accepts six named formats: A4, A3, A5, Letter, Legal and Tabloid. 89 x 36 mm address label is reached through the document's page box with prefer_css_page_size set, which is a supported path and not a workaround.

Does landscape need a different page size?

No. Landscape is the same rectangle turned, so it is set as an orientation rather than as swapped dimensions. Writing the width and height the other way round produces the same page and makes the intent harder to read later.

Other page sizes

Sizes that come up in the same conversation, and one from each of the other families.

Paste the CSS below into the playground and see the page box it produces.