Auto save PDF files in Flutter

Nutrient Flutter SDK automatically saves a modified open document to your device’s local storage. You can also manually save the changes. Note that files are saved locally on your device, and no server is required.

Auto save

Nutrient will automatically save changed, created, or deleted annotations and bookmarks on several occasions. In practice, this means that automatic saving will be performed when:

  • The application goes into the background

  • A configuration change occurs (for example, change of device orientation, change of locale, added keyboard)

  • The PDF view is fully covered by another view

  • A document will be digitally signed

Disabling automatic saving

Autosave is enabled by default. To disable autosave, set the disableAutosave: true configuration to the Nutrient Flutter SDK using the PdfConfiguration object, like so:

PdfConfiguration(disableAutosave: true);

Manual save

Saving can always be triggered manually by calling save(), like this:

await pdfDocument.save();

To manually save documents using the Nutrient Flutter SDK, ensure that the documentPath passed to either PspdfkitWidget or Pspdfkit.present is a writable path.