Annotation and Bookmarks Saving Triggers


PSPDFKit will save "dirty" (changed/created/deleted) annotations on several occasions.

  • When the viewController is popped. (In viewWillDisappear: - unless PSPDFKit is presenting a controller on top of it)
  • When the document on the PSPDFViewController is changed.
  • When saveAfterToolbarHiding of the PSPDFAnnotationToolbar is enabled.
  • When the app is moved into the background (UIApplicationDidEnterBackgroundNotification, UIApplicationWillTerminateNotification).
  • When UIActivityViewController asks for a document data/url to share.

Each time, the delegate method on PSPDFDocumentDelegate (void)pdfDocument:(PSPDFDocument *)document didSaveAnnotations:(NSArray *)annotations is called.

Saving can also be controlled on a per-document level by setting annotationSaveMode.

Manual Saving

Saving can always be triggered from the main thread by calling save: on the document.

Was this page helpful? We're happy to answer any questions.