Paper Sizes

To set the size of the paper, you can use the size property on the @page selector in your CSS.

@page { size: A4 portrait; }

The size property can be one of these presets, combined with portrait (default) or landscape:

ValueDimensions
A0841 × 1189 mm
A1594 × 841 mm
A2420 × 594 mm
A3297 × 420 mm
A4210 × 297 mm
A5148 × 210 mm
A6105 × 148 mm
A774 × 105 mm
A1026 × 37 mm
B4250 × 353 mm
B5176 × 250 mm
letter8.5 × 11 in
legal8.5 × 14 in
ledger11 × 17 in

Custom Sizes

You can also set custom paper sizes using numeric width and height properties:

@page { size: 100mm 200mm; }
Generate PDFs at scale, without the DevOps.
Documentation
Support