Auto Save PDF Files in Flutter
PSPDFKit for Flutter 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
PSPDFKit 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 PSPDFKit for 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 pspdfkitWidgetController.save();
To manually save documents using the PSPDFKit for Flutter library, ensure that the documentPath
passed to either PspdfkitWidget
or Pspdfkit.present
is a writable path.