Print finishing / Binding
The inner margin a bound document needs and the outer one it does not
The extra width on the bound edge, which exists because a fastened document does not open flat and the innermost part of the page curves away from the reader.
What is physically going on
On a single loose sheet all four margins are a design decision. On a bound one the inner margin is a physical requirement: some of it disappears into the binding and some of it curves into the fold, so the text block has to start further from the edge than it would otherwise. How much depends on the binding method and on how thick the document is, and the two compound, because a thicker book opens less flat than a thin one. The mistake is to set four equal margins, which looks balanced on a screen and produces a bound document where the inner text is harder to read than the outer, and in a thick one is partly swallowed.
The decisions
Reasons rather than a description of the code. Where a number depends on the stock or the press, the instruction is to get it from the printer rather than to quote one here, because spine width, creep and bulk are not constants.
- Make the inner margin wider than the outer, and get the amount from the binder for the method and the extent, because it varies by both.
- Mirror the margins between left and right pages so the wide margin is always on the bound edge, which is the whole point of the page pseudo-classes.
- Keep the folio and any running header on the outer edge, where a reader flicking through can see them, rather than in the gutter where the binding hides them.
- Nothing important goes in the gutter: no text, no rules, no part of an image that has to be seen, and no signature line.
- For a document that will be punched and filed rather than bound, the same reasoning applies to the punched edge and the clearance is larger.
- Design for the thickest extent the document can reach. A margin that works at forty pages can be inadequate at two hundred.
What it means for the page rule
The page rule is the part of this a document author controls. The binder decides the gutter and the printer decides the creep allowance; the document's job is to leave the room those decisions need.
/* The wide margin is on the bound edge, so it swaps between left and
right pages. Everything else stays put. */
@page {
size: A4;
margin: 22mm 20mm 26mm;
}
@page :left {
margin-right: 30mm; /* bound edge is on the right of a left page */
@bottom-left { content: counter(page); } /* folio on the outer edge */
}
@page :right {
margin-left: 30mm; /* bound edge is on the left of a right page */
@bottom-right { content: counter(page); }
}
/* Get the 30mm from the binder rather than from here: it depends on the
binding method and on how thick the finished document is, and those
compound. */What people do instead
Setting four equal margins because the page looks balanced that way in a single-page preview. A preview shows one sheet in isolation, which is the one context in which the gutter does not exist, and the failure only appears once a real copy is bound.
How to find out rather than assume
Print the document double sided, bind or staple it the way it will actually be bound, and open it in the middle where the curve is worst. Read the innermost line on both pages. If you have to flatten the spine to do it, the gutter is too small.
Where this API sits in it
Outside it. This API renders HTML to PDF: it produces a sequence of pages at the size and margins your CSS and the render options set, and everything on this page happens afterwards, to paper, in a bindery. There is no imposition option, no binding option and no finishing option, and there could not be, because none of those are properties of a file. What the render does decide is the two things finishing cares about most: how many pages there are, and how much room is left at the edges. Both of those are set before anything is printed, which is why a finishing constraint discovered late is expensive and one designed for is free.
Frequently asked
Can the API impose the pages into printer spreads?
No, and you should not want it to. Imposition is done by the printer with tooling built for it, against the specific press, stock and folding scheme, and the input that tooling wants is single pages in reading order, which is what a render naturally produces. Supplying anything else means somebody has to undo it first.
How do I get the page count to a multiple of four?
By deciding where the padding goes rather than letting it land at the end. Add the blanks deliberately, style them with the blank page rule so they carry no folio or running header, and mark them as intentionally blank if the document is formal. Counting the covers into the total is the step people miss.
Do any of these apply to a document that is only ever read on screen?
No. This cluster is about physical operations on paper, so if a document is genuinely never printed, none of it is your problem. It is worth checking that assumption rather than making it: delivery notes, permits, method statements and invoices all end up on paper more often than the people generating them expect.
Related finishing topics
The operations that constrain each other, then the rest of the same group.
Perfect binding, the spine width, and the page that will not open
Sheets glued at a flat spine rather than folded, which gives a printable spine and a document that opens less flat than a stapled one.
Why a stapled booklet has to have a page count divisible by four
A booklet made by folding sheets and stapling through the spine, where every sheet carries four pages and the arithmetic is therefore not optional.
Corner stapling, and the content the staple goes through
A single staple through the top corner, which is how most office documents are fastened and which occupies a specific area of every page.
@page :first, :left, :right in paged output
The property that expresses this in the page rule.
Every finishing topic
The full list, grouped by binding, folding and trimming, and collation.
None of this is a render option, and none of it could be. What the render controls is that the page count and the margins are the ones the finishing needs.