PDFViewer.undo()
Restore previous document state. Edit Text edits pending are written first, as one step, and that step is what this undo backs out; nothing is undone when the write is refused.
methodHistorysince 1.0.0
Signature
undo(): Promise<void>
Returns
Promise<void> Resolves once restored.
Throws
INVALID_STATEafterdestroy().
Example
TypeScript
if (viewer.canUndo()) await viewer.undo();