ISO A series / A6
A6 page size for PDF generation
A6 is postcard size, a quarter of an A4 sheet, and the smallest ISO size that still holds a paragraph comfortably.
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: 105 x 148 mm
- Inches: 4.13 x 5.83 in
- Points: 298 x 420 pt
- CSS pixels: 397 x 559 px at 96 dpi
Where the size comes from
A6 is A4 folded twice. It is the international postcard size, and it is the reason a stack of postcards and a stack of A4 paper are the same shape. It is also the standard insert size for a C6 envelope, which is what most personal mail arrives in.
What gets printed at this size
- postcards and direct mail inserts
- loyalty and appointment cards printed four-up on A4
- warranty and thank-you cards packed inside a shipment
- index cards and small reference sheets
Margins that survive a real printer
8mm all round, and no less. At this size the margin is doing structural work: it is the only thing stopping the design from touching a cut edge, and commercial trimming is accurate to roughly a millimetre either way. If the card is being professionally printed with a background colour, extend the background 3mm past the page on every side as bleed and expect it to be trimmed off.
The CSS
A6 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.
@page {
/* Not a named format the API accepts. Declare it in CSS and set
prefer_css_page_size so the renderer uses the document's page box. */
size: 105mm 148mm;
margin: 8mm;
}
body {
font-size: 8.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.
{
"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
Treating A6 as a small A4 and keeping a 40mm letterhead on it. That is 27 percent of the page gone before a word is written. A6 needs its own layout, not a scaled one.
Frequently asked
What is A6 in pixels?
397 x 559 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 105 x 148 mm instead, because a page laid out in pixels shifts whenever the render scale changes.
Can I pass A6 as a format?
No. The API accepts six named formats: A4, A3, A5, Letter, Legal and Tabloid. A6 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.
A4 page size for PDF generation
A4 is the default page for business documents everywhere except North America, and the default this API uses when no format is given.
A3 page size for PDF generation
A3 is two A4 sheets side by side, and it is what a document becomes when a table stops fitting.
A5 page size for PDF generation
A5 is half an A4 sheet, and the right size for a document that is short enough that A4 looks empty.
B5 page size for PDF generation
ISO B5 sits between A5 and A4, and it is the standard book block size across much of Europe and Asia.
US Letter page size for PDF generation
Letter is 8.5 by 11 inches and it is the default page in the United States, Canada, Mexico, Chile and the Philippines.
4x6 shipping label PDF size
The 4 by 6 inch label is the standard thermal shipping label accepted by every major carrier, and the most common non-paper page size an API renders.
80mm thermal receipt PDF size
The 80mm roll is the standard point-of-sale receipt: 80 millimetres of paper, a printable width of about 72mm, and a length that depends on the order.
Every page size, with dimensions
The full list, grouped by what the size is for.
Paste the CSS below into the playground and see the page box it produces.