Web SDKv1.0.0

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_STATE after destroy().

Example

TypeScript
if (viewer.canUndo()) await viewer.undo();

More in PDFViewer