# PDFViewer.print()

```ts
print(options?: PrintOptions): Promise<void>
```

Ask for pages and annotations (or take them from `options`), render at 300 DPI (within [performance.maxRenderPixels](https://kernstra.com/docs/web-sdk/config/performance/maxrenderpixels)) with progress, and open the browser print dialog. Needs the `print` feature.

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `options?` | `PrintOptions` | `{ pages?: number[]; annotations?: boolean }` — the pages to print (zero-based; every page when omitted) and whether annotations are printed (`true` when omitted). Without it the viewer asks for pages and annotations. |

Returns `Promise<void>`: Resolves when the browser reports the print dialog closed (`afterprint`), or after a minute where it never does.

Throws:

- `INVALID_ARGUMENT` for a `pages` list that is empty or names a page the document has not.
- `FEATURE_NOT_LICENSED` without the `print` feature.
- `PERMISSION_DENIED` when the document forbids printing.
- `INVALID_STATE` after `destroy()`.

```ts
await viewer.print({ pages: [0, 1], annotations: false });
```

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/print
