# useResetPdf

Source: https://sdk.pdf.net/docs/v1/reference/useResetPdf



Returns a function that unloads the current document and returns the load state to `'initial'`, such as for an "open another document" action.

```ts
const resetPdf = useResetPdf()

resetPdf()
```

Everything derived from the unloaded document becomes invalid: page and block ids, widget snapshots, [document revisions](https://sdk.pdf.net/docs/v1/reference/useDocumentRevision), and the undo history. The [search](https://sdk.pdf.net/docs/v1/reference/useDocumentSearch) starts over with an empty query. Read the fresh state through the hooks after the next [useLoadPdf](https://sdk.pdf.net/docs/v1/reference/useLoadPdf) call.

