PDFViewer.snapshot()
Save current document state for undo (called automatically after committed edits). Skipped, with an
error event, while a progressively-loaded document is still downloading — so undo has a gap until whenFullyLoaded() resolves. A change whose undo step could not be recorded (an error with EXPORT_FAILED) still counts: hasUnsavedChanges turns true and documentChanged reports it. A change made through the document API while Edit Text has unwritten edits writes those edits first, then reloads; if they cannot be written, the viewer reports INVALID_STATE on error and the edits are lost.methodHistorysince 1.0.0
Signature
snapshot(): Promise<void>
Returns
Promise<void> Resolves once recorded.
Throws
INVALID_STATEafterdestroy().