PTFileAttachmentHandlerDelegate
@protocol PTFileAttachmentHandlerDelegate <NSObject>
A set of methods that allow a conforming class to be notified about events from a PTFileAttachmentHandler
instance.
-
Tells the delegate that the file attachment annotation was successfully exported to the indicated location.
Declaration
Objective-C
- (void)fileAttachmentHandler: (nonnull PTFileAttachmentHandler *)fileAttachmentHandler didExportFileAttachment:(nonnull PTFileAttachment *)fileAttachment fromPDFDoc:(nonnull PTPDFDoc *)doc toURL:(nonnull NSURL *)exportedURL;Swift
optional func fileAttachmentHandler(_ fileAttachmentHandler: PTFileAttachmentHandler, didExport fileAttachment: PTFileAttachment, from doc: PTPDFDoc, to exportedURL: URL)Parameters
fileAttachmentHandlerthe file attachment handler that called this method
fileAttachmentthe file attachment annotation that was exported
docthe PDF document containing the file attachment
exportedURLthe URL of the exported file attachment
-
Tells the delegate that the file attachment could not be exported from the PDF document.
Declaration
Objective-C
- (void)fileAttachmentHandler: (nonnull PTFileAttachmentHandler *)fileAttachmentHandler didFailToExportFileAttachment:(nonnull PTFileAttachment *)fileAttachment fromPDFDoc:(nonnull PTPDFDoc *)doc withError:(nonnull NSError *)error;Swift
optional func fileAttachmentHandler(_ fileAttachmentHandler: PTFileAttachmentHandler, didFailToExport fileAttachment: PTFileAttachment, from doc: PTPDFDoc, withError error: any Error)Parameters
fileAttachmentHandlerthe file attachment handler that called this method
fileAttachmentthe file attachment to be exported
docthe PDF document containing the file attachment
erroran
NSErrorindicating the reason that the file attachment could not be exported.
PTFileAttachmentHandlerDelegate Protocol Reference