PDFPipe

North American sizes / Half Letter

Half Letter page size for PDF generation

Half Letter is 5.5 by 8.5 inches, the North American answer to A5, made by cutting a Letter sheet across its long side.

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: 139.7 x 215.9 mm
  • Inches: 5.5 x 8.5 in
  • Points: 396 x 612 pt
  • CSS pixels: 528 x 816 px at 96 dpi

Where the size comes from

It is exactly half a Letter sheet by area, but because Letter is not a root-two rectangle the halves are a different shape from the whole. That is why a Letter page scaled to fit Half Letter leaves white bands, and why Half Letter layouts have to be designed rather than reduced.

What gets printed at this size

  • booklets and programmes printed two-up on Letter
  • planner and notebook inserts, where it is the dominant size
  • receipts, order slips and short-form handouts
  • statement stuffers that fold into a #10 envelope

Margins that survive a real printer

0.5 inch all round. A Half Letter page has a little over a third of the area of A4, so the margin has to be told to be modest or it takes over the page. If the sheet is being trimmed out of a Letter parent sheet, the trimmed edges are accurate to about a millimetre, so keep anything aligned at least 4mm in.

The CSS

Half Letter 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: 5.5in 8.5in;
  margin: 0.5in;
}

body {
  font-size: 9.5pt;
  line-height: 1.4;
}

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

Expecting a Letter document to reduce onto it. Letter to Half Letter is not a clean reduction the way A4 to A5 is, because the aspect ratios differ. Anything that has to work at both sizes needs two layouts.

Frequently asked

What is Half Letter in pixels?

528 x 816 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 139.7 x 215.9 mm instead, because a page laid out in pixels shifts whenever the render scale changes.

Can I pass Half Letter as a format?

No. The API accepts six named formats: A4, A3, A5, Letter, Legal and Tabloid. Half Letter 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.