# PdfDocumentStatus reference

Lifecycle status of a document load: idle without a source, loading, ready with a document, or error with a `PdfViewerError`.

## Used by

- [Loading states](https://react-pdf-viewer-chi.vercel.app/react-pdf-viewer/loading-states.md)

## Import

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

Signature: `type PdfDocumentStatus = 'idle' | 'loading' | 'ready' | 'error'`

## Properties

| Name | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `idle` | `'idle'` | — | No | No source, or an HTTP error that `onHttpError` handled. |
| `loading` | `'loading'` | — | No | Fetching or parsing the document. |
| `ready` | `'ready'` | — | No | The document is loaded and pages can render. |
| `error` | `'error'` | — | No | Loading failed; the error is available. |

## Source

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

