# FitOptions reference

Constrains a rendered page to a box: fit its width, its height or both, and choose whether it may grow beyond its natural size.

## Used by

- [Rendering](https://react-pdf-viewer-chi.vercel.app/react-pdf-viewer/rendering.md)

## Import

```ts
import type { FitOptions } from '@kingtech/react-pdf-viewer';
```

## Properties

| Name | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `width` | `number` | — | No | Available width in CSS pixels, including border and padding. |
| `height` | `number` | — | No | Available height in CSS pixels, including border and padding. |
| `upscale` | `boolean` | — | No | Scale up to fill the box; otherwise the page only ever shrinks. |

## Source

[packages/react-pdf-viewer/src/core/geometry.ts](https://github.com/kiralygyula92/react-pdf-viewer/blob/main/packages/react-pdf-viewer/src/core/geometry.ts#L48)

