Set the dimensions of your PDF output using standard presets or custom sizes
size
parameter allows you to control the dimensions of the generated PDF document.
preset
, any provided width
and height
values are ignored.preset
property takes precedence over custom dimensions if both are provided.preset
nor custom dimensions are specified, the default A4 size is used.Preset | Size (mm) | Size (inches) |
---|---|---|
a0 | 841 × 1189 | 33.1 × 46.8 |
a1 | 594 × 841 | 23.4 × 33.1 |
a2 | 420 × 594 | 16.5 × 23.4 |
a3 | 297 × 420 | 11.7 × 16.5 |
a4 | 210 × 297 | 8.3 × 11.7 |
a5 | 148 × 210 | 5.8 × 8.3 |
a6 | 105 × 148 | 4.1 × 5.8 |
a7 | 74 × 105 | 2.9 × 4.1 |
a8 | 52 × 74 | 2.0 × 2.9 |
a9 | 37 × 52 | 1.5 × 2.0 |
a10 | 26 × 37 | 1.0 × 1.5 |
letter | 216 × 279 | 8.5 × 11.0 |
legal | 216 × 356 | 8.5 × 14.0 |
tabloid | 279 × 432 | 11.0 × 17.0 |
ledger | 432 × 279 | 17.0 × 11.0 |
a4
or letter
for documents that need to conform to standard paper sizes.
prefer_css_page_size
parameter in conjunction with size
to control how content is scaled to fit the page.