# PDFViewer.fitToWidth()

```ts
fitToWidth(): void
```

Zoom to fit page width in container.

- Kind: method
- Since: 1.0.0

Returns `void`

Throws:

- `INVALID_STATE` after `destroy()`.

Part of [PDFViewer](https://kernstra.com/docs/web-sdk/api/pdfviewer) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/pdfviewer/fittowidth
