Other Type Definitions

The following type definitions are available globally.

  • 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 NSImage *_Nonnull (^PSPDFAnnotationGroupItemConfigurationBlock)(
        PSPDFAnnotationGroupItem *_Nonnull, id _Nullable, NSColor *_Nonnull)

    Swift

    typealias PSPDFAnnotationGroupItemConfigurationBlock = (PSPDFAnnotationGroupItem, Any?, NSColor) -> NSImage

    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 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
  • 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 PSPDFRenderDrawBlock = (CGContext, PageIndex, CGRect, PSPDFRenderOptions) -> 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.

    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, PSPDFDataSink?, 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 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