Page sizes
Common paper sizes, unit conversion, orientation, custom dimensions, and print bleed.
Every page in a Format document is a fixed-size box. A Layout sets that size with a width and a height in CSS pixels, and every page it produces is exactly those dimensions.
These are the only values Format requires in pixels. The pixel value applies directly as the page box's dimensions, so the outer size of the page is one fixed unit while everything inside stays ordinary CSS: mm, cm, in, pt, and % all work exactly as they do on the web. A width or height in any other unit is rejected; the value must end in px.
Common paper sizes
ISO A series (worldwide except North America)
| Name | Millimeters | CSS pixels |
|---|---|---|
| A3 | 297 × 420 | 1122.52 × 1587.40 |
| A4 | 210 × 297 | 793.71 × 1122.52 |
| A5 | 148 × 210 | 559.37 × 793.71 |
| A6 | 105 × 148 | 396.85 × 559.37 |
North American
| Name | Inches | CSS pixels |
|---|---|---|
| Letter | 8.5 × 11 | 816.00 × 1056.00 |
| Legal | 8.5 × 14 | 816.00 × 1344.00 |
| Tabloid (Ledger) | 11 × 17 | 1056.00 × 1632.00 |
| Half Letter (Statement) | 5.5 × 8.5 | 528.00 × 816.00 |
Long-form
| Name | Inches | CSS pixels |
|---|---|---|
| US Executive | 7.25 × 10.5 | 696.00 × 1008.00 |
| Folio | 8.5 × 13 | 816.00 × 1248.00 |
Converting from other units
If your size isn't in the table above, convert it. One CSS pixel is 1/96th of an inch by definition, so every absolute unit maps to pixels through a fixed ratio from the CSS Values and Units spec:
| Unit | Name | Equivalence | In pixels |
|---|---|---|---|
in | inches | 1in = 2.54cm | 96 |
cm | centimeters | 1cm = 96px/2.54 | ≈ 37.795 |
mm | millimeters | 1mm = 1/10 cm | ≈ 3.7795 |
pt | points | 1pt = 1/72 in | ≈ 1.333 |
pc | picas | 1pc = 1/6 in | 16 |
Q | quarter-millimeters | 1Q = 1/40 cm | ≈ 0.945 |
px | pixels | 1px = 1/96 in | 1 |
So A4 (210 mm × 297 mm) is 793.71 × 1122.52 px:
<Layout id="invoice" width={793.71} height={1122.52}>...</Layout>Landscape and portrait
Swap width and height to rotate. The same A4 page in landscape:
<Layout id="dashboard" width={1122.52} height={793.71}>...</Layout>A document can mix portrait and landscape by giving each run of pages its own Layout with its own dimensions. Each Layout starts on a fresh page, so the orientation switch is clean.
Custom sizes
Any positive pixel value works. For unusual formats, invitations, posters, fold-out leaflets, measure your target in millimeters or inches and convert with the ratios above.
Bleed and trim
Format has no separate bleed setting. A page is exactly the width and height you give it, so bleed is something you build into those dimensions rather than a property you toggle.
Print bleed means running your background past the trim line, so slight cuts during finishing don't leave white edges. The standard is 3 mm on every side. To produce a print-ready PDF with bleed:
- Enlarge
widthandheightby 6 mm total, 3 mm per edge. A4 (793.71 × 1122.52 px) becomes 816.39 × 1145.20 px, since 3 mm is 11.34 px (3 × 96 ÷ 25.4). - Apply the background on
:host, usemarginfor the 3 mm bleed, and usepaddingto hold content inside the trim:
:host {
background: #fdf8ef; /* fills the whole page, bleed included */
margin: 3mm; /* the trim line sits 3mm in from each edge */
padding: 2cm; /* keep content clear of the trim */
}The background reaches the physical edge because Format lifts your :host background-color onto the page box behind the margin. The margin insets the page itself, so the color in the 3 mm band is the bleed and the trimmed page is everything inside it.
Only a solid background-color is carried to the page edge. A full-bleed image or gradient set on :host stays inside the margin and leaves the band empty. For those, drop the margin: let :host fill the enlarged page so the artwork reaches every edge, and inset your content with padding alone.
If your document is only ever read on screen (web download, email), you don't need bleed. Size the page to the finished dimensions and skip the margin.