PDFPipe

Envelopes / C5 envelope

C5 envelope PDF size

C5 is 229 by 162 millimetres and it holds an A4 sheet folded once, or an A5 document flat.

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: 229 x 162 mm
  • Inches: 9.02 x 6.38 in
  • Points: 649 x 459 pt
  • CSS pixels: 866 x 612 px at 96 dpi

Where the size comes from

The C series exists to hold the A series. Each C size is sized to take the A size with the same number, and C5 takes A5 unfolded or A4 folded in half. The geometric mean relationship that defines the C series is the reason the fit is snug rather than loose: a C5 is only a few millimetres larger than A5 in each direction.

What gets printed at this size

  • documents that should not be folded twice, such as certificates
  • multi-page contracts and packs too thick for a DL
  • A5 booklets and programmes posted flat

Margins that survive a real printer

12mm all round, with the top right 60 by 30mm kept clear for postage. If the envelope has a window it is usually 90 by 45mm positioned 20mm from the left and 50mm from the bottom, but C5 window positions vary far more between suppliers than DL does, so measure the stock you actually bought.

The CSS

C5 envelope 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: 229mm 162mm;
  margin: 12mm;
}

.postage-clear-zone {
  /* Nothing prints here. Not a border, not a background tint. */
  position: absolute;
  top: 0;
  right: 0;
  width: 60mm;
  height: 30mm;
}

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

Assuming C5 and A5 are the same size because they hold the same sheet. C5 is 229 by 162 and A5 is 210 by 148, so artwork set at A5 printed on a C5 envelope sits 19mm short in one direction and 14mm in the other.

Frequently asked

What is C5 envelope in pixels?

866 x 612 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 229 x 162 mm instead, because a page laid out in pixels shifts whenever the render scale changes.

Can I pass C5 envelope as a format?

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