---
title: "Enable incremental saving of PDFs in JavaScript viewer | Nutrient"
canonical_url: "https://www.nutrient.io/guides/web/features/document-processing/"
md_url: "https://www.nutrient.io/guides/web/features/document-processing.md"
last_updated: "2026-06-09T10:25:14.552Z"
description: "Discover the differences between incremental and full saving strategies in document management, and how Nutrient Web SDK handles both methods effectively."
---

# Enable incremental saving of PDFs using JavaScript

When persisting changes to an open document, two main strategies are available: incremental saving and full saving.

Incremental saving consists of appending new changes to the end of a document while keeping the previous versions of it intact, which is useful when working with digitally signed documents, as digital signatures are invalidated if the integrity of the signed content is compromised.

Full saving, on the other hand, rewrites the entire document instead of appending changes at the end of it. This prevents the document file size from growing on every revision, but it’s slower than incremental saving.

Nutrient Web SDK uses full saving by default, except for with digitally signed documents, which use incremental saving by default (if the Digital Signatures component is present in the license). If you wish to use incremental saving instead, you have to set the `incremental` flag to `true` when calling [`Instance#exportPDF()`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#exportPDF):

```js

instance.exportPDF({
  incremental: true
});

```

If the `incremental` and the `flatten` flags are both set to `true` when passed to `instance#exportPDF()`, the call will throw an error, as flattening is a destructive operation that removes the annotations from the exported document. In that case, incremental saving won’t be possible.
---

## Related pages

- [Save PDF files using JavaScript](/guides/web/save-a-document.md)
- [Detecting unsaved changes in PDFs](/guides/web/save-a-document/detect-unsaved-changes.md)
- [Auto-saving PDF changes in our JavaScript viewer](/guides/web/features/saving.md)
- [Save PDFs to Document Engine using JavaScript](/guides/web/save-a-document/to-document-engine.md)
- [Save documents as PDFs on the web](/guides/web/save-a-document/save-as.md)
- [Save PDF without annotations using JavaScript](/guides/web/save-a-document/without-annotations.md)
- [Save PDFs to local storage using JavaScript](/guides/web/save-a-document/to-local-storage.md)
- [Save PDFs to an ArrayBuffer using JavaScript](/guides/web/save-a-document/to-arraybuffer.md)
- [Save PDFs to a remote server using JavaScript](/guides/web/save-a-document/to-remote-server.md)

