Other Type Definitions

The following type definitions are available globally.

  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFActionOption

    Swift

    struct Option : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Names of analytics events.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnalyticsEventName

    Swift

    struct EventName : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Names of attributes for an analytics event.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnalyticsEventAttributeName

    Swift

    struct EventAttributeName : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Values for an analytics event attribute.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnalyticsEventAttributeValue

    Swift

    struct EventAttributeValue : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Available annotation types. Set in editableAnnotationTypes of PDFConfiguration.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationString

    Swift

    struct Tool : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Available variants for annotations.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationVariantString

    Swift

    struct Variant : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Unique identifier for different annotation types. Amalgamation of annotation type and its variant. Use PSPDFAnnotationToolVariantIDMake to generate an identifier in Objective-C. Use Annotation.ToolVariantID(tool:variant:) to generate an identifier in Swift.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationStateVariantID

    Swift

    struct ToolVariantID : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Returns a template image (UIImageRenderingModeAlwaysTemplate).

    See

    itemWithType:variant:configurationBlock:

    Declaration

    Objective-C

    typedef UIImage *_Nonnull (^PSPDFAnnotationGroupItemConfigurationBlock)(
        PSPDFAnnotationGroupItem *_Nonnull, id _Nullable, UIColor *_Nonnull)

    Parameters

    item

    The annotation group item.

    container

    The containing AnnotationToolbar.

    tintColor

    The tint color applied to the image.

    Return Value

    The custom image.

  • Additional behaviors when creating, changing, or deleting annotations.

    These constants will primarily be used as keys in the userInfo dictionary of annotation specific notifications.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationOption
  • A list of annotation style keys (inner array) grouped into serval groups (outer array).

    Declaration

    Objective-C

    typedef NSArray<NSArray<PSPDFAnnotationStyleKey> *>
        *PSPDFAnnotationStyleKeyGroupedList

    Swift

    typealias PSPDFAnnotationStyleKeyGroupedList = NSArray
  • A block type that takes an annotation and returns the grouped list of style keys for that particular annotation.

    Declaration

    Objective-C

    typedef PSPDFAnnotationStyleKeyGroupedList _Nonnull (
        ^PSPDFAnnotationStyleBlock)(PSPDFAnnotation *_Nonnull)

    Swift

    typealias PSPDFAnnotationStyleBlock = (PSPDFAnnotation) -> [[String]]
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationStyleType

    Swift

    struct Kind : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFAppearanceStreamGenerationOption

    Swift

    struct AppearanceStreamGenerationOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Available policy events.

    Declaration

    Objective-C

    typedef NSString *PSPDFPolicyEvent

    Swift

    struct PolicyEvent : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFButtonActionBlock)(PSPDFButton *button)

    Swift

    typealias PSPDFButtonActionBlock = (PDFButton) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFCacheDocumentImageRenderingCompletionBlock)(UIImage *image, PSPDFDocument *document, PSPDFPageIndex page, CGSize size)

    Swift

    typealias PSPDFCacheDocumentImageRenderingCompletionBlock = (UIImage, PSPDFDocument, PageIndex, CGSize) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFObjectFinderOption

    Swift

    struct ObjectFinderOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFObjectFinderType

    Swift

    struct ObjectFinderType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Document page number.

    Declaration

    Objective-C

    typedef NSNumber *PSPDFDocumentPageNumber

    Swift

    typealias PSPDFDocumentPageNumber = NSNumber
  • When saving a document, you can provide various save options as outlined below.

    Declaration

    Objective-C

    typedef NSString *PSPDFDocumentSaveOption

    Swift

    struct PDFDocumentSaveOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFDocumentUnderlyingFileChangedNotificationOptions

    Swift

    struct UnderlyingFileChangedNotificationOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Annotation write options.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationWriteOption

    Swift

    struct AnnotationWriteOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFDocumentEditorSuccessBlock)(BOOL success, NSError *_Nullable error)

    Swift

    typealias PSPDFDocumentEditorSuccessBlock = (Bool, Error?) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFDocumentEditorSaveBlock)(PSPDFDocument *_Nullable document, NSError *_Nullable error)

    Swift

    typealias PSPDFDocumentEditorSaveBlock = (Document?, Error?) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFDocumentEditorImportBlock)(NSArray<PSPDFEditingChange *> * _Nullable changes, NSError *_Nullable error)

    Swift

    typealias PSPDFDocumentEditorImportBlock = ([PDFEditingChange]?, Error?) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef SEL PSPDFDocumentFeature

    Swift

    typealias PSPDFDocumentFeature = Selector
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFDocumentInfoOption

    Swift

    struct DocumentInfoOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • The destination action or controller for the sharing flow.

    Declaration

    Objective-C

    typedef NSString *PSPDFDocumentSharingDestination

    Swift

    struct Destination : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFDocumentSharingUserInfoKey

    Swift

    struct PDFDocumentSharingUserInfoKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFDocumentSignDataCompletionBlock)(BOOL status, NSData * _Nullable signedData)

    Swift

    typealias PSPDFDocumentSignDataCompletionBlock = (Bool, Data?) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef unsigned long PSPDFPageIndex

    Swift

    typealias PageIndex = UInt
  • Undocumented

    Declaration

    Objective-C

    typedef unsigned long PSPDFPageCount

    Swift

    typealias PageCount = UInt
  • Undocumented

    Declaration

    Objective-C

    typedef unsigned long PSPDFFileIndex

    Swift

    typealias FileIndex = UInt
  • Defines how the attachment looks. Supported are PushPin, Paperclip, Graph and Tag.

    Declaration

    Objective-C

    typedef NSString *PSPDFFileIconName

    Swift

    struct IconName : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFFileManagerOption

    Swift

    struct Option : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef BOOL (^PSPDFSubmissionControllerShouldContinueBlock)(PSPDFFormRequest *formRequest)

    Swift

    typealias PSPDFSubmissionControllerShouldContinueBlock = (PDFFormRequest) -> Bool
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFSubmissionControllerBeforeSubmissionBlock)(PSPDFFormRequest *formRequest)

    Swift

    typealias PSPDFSubmissionControllerBeforeSubmissionBlock = (PDFFormRequest) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFSubmissionControllerCompletionBlock)(NSData *data, NSURLResponse *response)

    Swift

    typealias PSPDFSubmissionControllerCompletionBlock = (Data, URLResponse) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFSubmissionControllerErrorBlock)(NSError *error)

    Swift

    typealias PSPDFSubmissionControllerErrorBlock = (Error) -> Void
  • Available Keys used in the option dictionary of PSPDFGalleryItem.

    Declaration

    Objective-C

    typedef NSString *PSPDFGalleryOption

    Swift

    struct Option : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Available Keys used create a dictionary for initializing PSPDFGalleryItem. Constants correspond to the PSPDFGalleryItem properties.

    Declaration

    Objective-C

    typedef NSString *PSPDFGalleryItemProperty

    Swift

    struct Property : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFGalleryManifestCompletionBlock)(NSArray<PSPDFGalleryItem *> *_Nullable items, NSError *_Nullable error)

    Swift

    typealias PSPDFGalleryManifestCompletionBlock = ([PSPDFGalleryItem]?, Error?) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFSettingKey

    Swift

    struct Setting : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Available options which can be used while searching text using the PDFLibrary.

    Declaration

    Objective-C

    typedef NSString *PSPDFLibraryOption

    Swift

    struct Option : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • A block that is called for each candidate for indexing found when traversing the specified directory.

    Declaration

    Objective-C

    typedef BOOL (^PSPDFLibraryFileSystemDataSourceDocumentHandler)(
        PSPDFDocument *_Nonnull, BOOL *_Nonnull)

    Swift

    typealias PSPDFLibraryFileSystemDataSourceDocumentHandler = (PSPDFDocument, UnsafeMutablePointer<ObjCBool>) -> Bool

    Parameters

    document

    The candidate document.

    stop

    A pointer to a Boolean value. The block can set the value to YES to stop further enumeration of the directory. If a block stops further enumeration, that block continues to run until it’s finished. The stop argument is an out-only argument. You should only ever set this Boolean to YES within the block.

    Return Value

    A Boolean value that indicates whether document should be indexed or not.

  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFTemplateIdentifier

    Swift

    struct Identifier : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Deprecated

    Deprecated in PSPDFKit 12.3 for iOS. Use ‘UIAction.Identifier’ or ‘UIMenu.Identifier’ in the modern menu system.

    Undocumented

    Declaration

    Objective-C

    typedef NSString * PSPDFTextMenu

    Swift

    struct TextMenu : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFPresentationOption

    Swift

    struct PresentationOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • 1st argument: current page, 2nd argument: total pages

    Declaration

    Objective-C

    typedef void (^PSPDFProgressBlock)(NSUInteger, NSUInteger)

    Swift

    typealias PSPDFProgressBlock = (UInt, UInt) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef void (^PSPDFRemoteContentObjectAuthenticationBlock)(NSURLAuthenticationChallenge *, void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))

    Swift

    typealias PSPDFRemoteContentObjectAuthenticationBlock = (URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential) -> Void) -> Void
  • Undocumented

    Declaration

    Objective-C

    typedef _Nullable id (^PSPDFRemoteContentObjectTransformerBlock)(NSURL *location)

    Swift

    typealias PSPDFRemoteContentObjectTransformerBlock = (URL) -> Any?
  • A block passed to PSPDFKit to render additional content or graphics on a page. Set it on -[PSPDFRenderOptions drawBlock].

    Declaration

    Objective-C

    typedef void (^PSPDFRenderDrawBlock)(CGContextRef _Nonnull, PSPDFPageIndex,
                                         CGRect, PSPDFRenderOptions *_Nonnull)

    Swift

    typealias PDFRenderDrawBlock = (CGContext, PageIndex, CGRect, RenderOptions) -> Void

    Parameters

    context

    The graphics context that should be drawn into.

    pageIndex

    The index of the page being drawn.

    pageRect

    A rectangle the size of the page being drawn, with zero origin.

    options

    The PSPDFRenderOptions object that this block was attached to. For reference purposes only.

  • Completion block for the production of documents by a PSPDFSigner instance.

    Declaration

    Objective-C

    typedef void (^PSPDFSignatureCreationBlock)(BOOL, id<PSPDFDataSink> _Nullable,
                                                NSError *_Nullable)

    Swift

    typealias PSPDFSignatureCreationBlock = (Bool, DataSink?, Error?) -> Void

    Parameters

    success

    Indicates whether the PSPDFSigner operation finished successfully or not.

    document

    Instance of a PSPDFDataSink that contains the document produced by the PSPDFSigner operation.

    error

    Indicates why the PSPDFSigner operation didn’t finish successfully, in case success returned NO.

  • List of available encodings. Used in PSPDFSoundAnnotation.encoding.

    Declaration

    Objective-C

    typedef NSString *PSPDFSoundAnnotationEncoding

    Swift

    struct Encoding : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFSpeechControllerOption

    Swift

    struct Option : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Predefined standard values for a stamp annotation’s stampType, which will be written as Name in the PDF.

    Declaration

    Objective-C

    typedef NSString *PSPDFStampType

    Swift

    struct Kind : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable
  • Possible filter types for PSPDFThumbnailViewController.

    Declaration

    Objective-C

    typedef NSString *PSPDFThumbnailViewFilter

    Swift

    struct ThumbnailViewFilter : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable