# paperSizeToPixels

Canonical: https://docs.shumoku.dev/en/library/api/paperSizeToPixels
Language: en

@shumoku/core · 0.4.0 · function

# paperSizeToPixels

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/models/types.ts#L1251)

Convert paper size to pixels at given DPI

```
paperSizeToPixels(size: PaperSize, orientation?: PaperOrientation, dpi?: number): { height: number; width: number }
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `size` | `PaperSize` | No additional description. | `—` |
| `orientation` | `PaperOrientation` | No additional description. | `'portrait'` |
| `dpi` | `number` | No additional description. | `96` |

## Returns

```
{ height: number; width: number }
```

[`libs/@shumoku/core/src/models/types.ts:1251`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/models/types.ts#L1251)
