# PDFViewer.markSaved()

```ts
markSaved(): void
```

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()](https://kernstra.com/docs/web-sdk/api/pdfdocument/save) or your own path.

- Kind: method
- Since: 1.0.0

Returns `void`

Throws:

- `INVALID_STATE` after `destroy()`.

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

Part of [PDFViewer](https://kernstra.com/docs/web-sdk/api/pdfviewer) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/pdfviewer/marksaved
