# PDFDocument.pageCount

```ts
get pageCount(): number
```

Total number of pages.

- Kind: getter
- Since: 1.0.0

Returns `number`

Throws:

- `DOCUMENT_CLOSED` — read on a closed document.

```ts
const last = doc.pageCount - 1;
```

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

Web page: https://kernstra.com/docs/web-sdk/api/pdfdocument/pagecount
