useResetPdf

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

const resetPdf = useResetPdf()

resetPdf()

Everything derived from the unloaded document becomes invalid: page and block ids, widget snapshots, document revisions, and the undo history. The search starts over with an empty query. Read the fresh state through the hooks after the next useLoadPdf call.