Web SDKv1.0.0

PDFViewer.markSaved()

Tells the viewer the document as it stands is saved: hasUnsavedChanges is false until the next change. Called for you when the document is exported whole; call it yourself after saving through doc.save() or your own path.
methodHistorysince 1.0.0

Signature

markSaved(): void

Returns

void

Throws

  • INVALID_STATE after destroy().

Example

TypeScript
const bytes = await doc.save();
await fetch('/documents/42', { method: 'PUT', body: bytes.slice() });
viewer.markSaved();

More in PDFViewer