Other Type Definitions

The following type definitions are available globally.

  • Names of analytics events.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnalyticsEventName

    Swift

    struct PSPDFAnalyticsEventName : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Names of attributes for an analytics event.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnalyticsEventAttributeName

    Swift

    struct PSPDFAnalyticsEventAttributeName : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Values for an analytics event attribute.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnalyticsEventAttributeValue

    Swift

    struct PSPDFAnalyticsEventAttributeValue : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Available annotation types. Set in editableAnnotationTypes of PSPDFConfiguration.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationString

    Swift

    struct AnnotationString : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Available variants for annotations.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationVariantString

    Swift

    struct AnnotationVariantString : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Unique identifier for different annotation types. Amalgamation of annotation type and its variant.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationStateVariantID

    Swift

    struct AnnotationStateVariantID : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Returns a template image (UIImageRenderingModeAlwaysTemplate).

    See

    itemWithType:variant:configurationBlock:

    Declaration

    Objective-C

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

    Swift

    typealias PSPDFAnnotationGroupItemConfigurationBlock = (PSPDFAnnotationGroupItem, Any?, UIColor) -> UIImage

    Parameters

    item

    The annotation group item.

    container

    The containing PSPDFAnnotationToolbar.

    tintColor

    The tint color applied to the image.

    Return Value

    The custom image.

  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationOption

    Swift

    struct PSPDFAnnotationOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationStyleType

    Swift

    struct AnnotationStyleType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFAppearanceStreamGenerationOption

    Swift

    struct PSPDFAppearanceStreamGenerationOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Available policy events.

    Declaration

    Objective-C

    typedef NSString *PSPDFPolicyEvent
  • 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 PSPDFDocumentSaveOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFDocumentUnderlyingFileChangedNotificationOptions

    Swift

    struct PSPDFDocumentUnderlyingFileChangedNotificationOptions : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Annotation write options.

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationWriteOptions

    Swift

    struct PSPDFAnnotationWriteOptions : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef SEL PSPDFDocumentFeature

    Swift

    typealias PSPDFDocumentFeature = Selector
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFDocumentInfoOption

    Swift

    struct PSPDFDocumentInfoOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFDocumentSharingDestination

    Swift

    struct PSPDFDocumentSharingDestination : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFDocumentSharingUserInfoKey

    Swift

    struct PSPDFDocumentSharingUserInfoKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • 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 FileIconName : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFSettingKey

    Swift

    struct PSPDFSettingKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • 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 TemplateIdentifier : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFTextMenu

    Swift

    struct PSPDFTextMenu : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • 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, (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. This is passed as a render option under PSPDFRenderOptionDrawBlockKey.

    Declaration

    Objective-C

    typedef void (^PSPDFRenderDrawBlock)(
        CGContextRef _Nonnull, PSPDFPageIndex, CGRect, NSUInteger,
        NSDictionary<PSPDFRenderOption, id> *_Nullable)

    Swift

    typealias PSPDFRenderDrawBlock = (CGContext, PageIndex, CGRect, UInt, [PSPDFRenderOption : Any]?) -> Void

    Parameters

    context

    The graphics context that should be drawn into.

    pageIndex

    The index of the page being drawn.

    pageRect

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

    unused

    This used to be the page rotation but PSPDFKit now uses a normalized PDF coordinate space this is not used. It can’t be removed without causing silent breaking changes.

    options

    The setting used for rendering. See PSPDFRenderOption.

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

    Declaration

    Objective-C

    typedef NSString *PSPDFSoundAnnotationEncoding

    Swift

    struct PSPDFSoundAnnotationEncoding : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • 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 PSPDFStampType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFStylusDriverInfoKey

    Swift

    struct PSPDFStylusDriverInfoKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFConnectedStylusInfoKey

    Swift

    struct PSPDFConnectedStylusInfoKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFStylusSettingsControllerInfoKey

    Swift

    struct PSPDFStylusSettingsControllerInfoKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Undocumented

    Declaration

    Objective-C

    typedef NSString *PSPDFStylusButtonAction

    Swift

    struct PSPDFStylusButtonAction : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Possible filter types for PSPDFThumbnailViewController.

    Declaration

    Objective-C

    typedef NSString *PSPDFThumbnailViewFilter

    Swift

    struct PSPDFThumbnailViewFilter : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable