@protocol PSPDFDocumentDelegate <NSObject>
protocol PDFDocumentDelegate : NSObjectProtocol
Delegate to receive events regarding
This delegate offers callbacks for custom actions after save events.
PDF files can contain actions to other PDF files (
PSPDFRemoteGoToAction). Usually, these are attached to link annotations, but actions can also be connected to outline or forms.
PSPDFKit automatically tries to find the linked files based on the relative path. There are also built-in tokens such as
PSBundlethat help to navigate inside the typical iOS/macOS application folder structure.
This delegate allows custom tokens to be resolved, such as /MyAppToken. This delegate will only get called for unknown tokens, not any built-in ones.
Return nil if the token cannot be resolved.
Called after saving was successful. If document wasn’t modified, delegate will not be called.
This is called in response to
Document.save(options:completion:), which saves changes like editing annotations. This includes auto-saving from
PDFViewController. On the other hand, the document editor performs structural operations like reordering pages and uses a different saving mechanism. Therefore, this delegate method is not called when saving using
PDFDocumentEditoror the document editor UI.
WarningMight be called from a background thread.