> ## Documentation Index
> Fetch the complete documentation index at: https://docs.handtextai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Page Sizes & DPI

> Supported page sizes and how DPI scaling works.

HandTextAI renders a **single page** using a fixed page size and orientation.

## Supported page sizes

Use `page_size` with one of these values:

### ISO (A-series)

| page\_size | mm (W×H) | px @ 300 DPI | px @ 600 DPI |
| ---------- | -------: | -----------: | -----------: |
| `a3`       |  297×420 |    3508×4961 |    7016×9921 |
| `a4`       |  210×297 |    2480×3508 |    4960×7016 |
| `a5`       |  148×210 |    1748×2480 |    3496×4961 |
| `a6`       |  105×148 |    1240×1748 |    2480×3496 |

### US paper

| page\_size    | inches (W×H) | px @ 300 DPI | px @ 600 DPI |
| ------------- | -----------: | -----------: | -----------: |
| `letter`      |       8.5×11 |    2550×3300 |    5100×6600 |
| `legal`       |       8.5×14 |    2550×4200 |    5100×8400 |
| `half_letter` |      5.5×8.5 |    1650×2550 |    3300×5100 |

### Cards

| page\_size    | inches / mm (W×H) | px @ 300 DPI | px @ 600 DPI |
| ------------- | ----------------: | -----------: | -----------: |
| `postcard_us` |               4×6 |    1200×1800 |    2400×3600 |
| `card_5x7`    |               5×7 |    1500×2100 |    3000×4200 |
| `card_a2`     |          4.25×5.5 |    1275×1650 |    2550×3300 |
| `square_5x5`  |               5×5 |    1500×1500 |    3000×3000 |
| `card_96x135` |          96×135mm |    1134×1594 |    2268×3189 |

### Envelopes (content sizes)

| page\_size         | inches / mm (W×H) | px @ 300 DPI | px @ 600 DPI |
| ------------------ | ----------------: | -----------: | -----------: |
| `dl`               |          99×210mm |    1169×2480 |    2338×4960 |
| `envelope_10`      |         4.125×9.5 |    1238×2850 |    2476×5700 |
| `envelope_monarch` |         3.875×7.5 |    1163×2250 |    2326×4500 |

## Orientation

Set `orientation: "landscape"` to swap width and height.

## DPI scaling rule (critical)

All pixel parameters (margins, font size, spacing) are specified at a **300 DPI baseline**.

If you set `dpi: 600`, the service automatically scales these values so the output matches the same real-world physical size.
