Other Constants

The following constants are available globally.

  • In the old legacy file format the default number of PBKDF rounds is 50000. The new default is PSPDFAESDefaultPBKDFNumberOfRounds. (10000)

    Declaration

    Objective-C

    extern const NSUInteger PSPDFDefaultPBKDFNumberOfRounds

    Swift

    let PSPDFDefaultPBKDFNumberOfRounds: UInt
  • The PSPDFAESCryptoInputStream Error Domain.

    Note

    Used in the PSPDFAESCryptoInputStream -(NSError *)streamError method.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFAESCryptoInputStreamErrorDomain

    Swift

    let PSPDFAESCryptoInputStreamErrorDomain: String
  • The PSPDFAESCryptoOutputStream Error Domain.

    Note

    Used in the PSPDFAESCryptoOutputStream -(NSError *)streamError method.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFAESCryptoOutputStreamErrorDomain

    Swift

    let PSPDFAESCryptoOutputStreamErrorDomain: String
  • Set to @YES in the options dictionary to make links modal.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionModalKey

    Swift

    let PSPDFActionOptionModalKey: String
  • Enable Autoplay if target is a video.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionAutoplayKey

    Swift

    let PSPDFActionOptionAutoplayKey: String
  • Enable/Disable controls. (e.g. Browser back/next buttons)

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionControlsKey

    Swift

    let PSPDFActionOptionControlsKey: String
  • Loop the video.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionLoopKey

    Swift

    let PSPDFActionOptionLoopKey: String
  • Allow fullscreen presentation.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionFullscreenKey

    Swift

    let PSPDFActionOptionFullscreenKey: String
  • Set video offset.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionOffsetKey

    Swift

    let PSPDFActionOptionOffsetKey: String
  • Set modal size.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionSizeKey

    Swift

    let PSPDFActionOptionSizeKey: String
  • Show as popover.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionPopoverKey

    Swift

    let PSPDFActionOptionPopoverKey: String
  • Show cover, accepts string path.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionCoverKey

    Swift

    let PSPDFActionOptionCoverKey: String
  • The target page.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionPageKey

    Swift

    let PSPDFActionOptionPageKey: String
  • Shows a button that activates links.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionButtonKey

    Swift

    let PSPDFActionOptionButtonKey: String
  • Controls if a close button is displayed, when PSPDFActionOptionButtonKey is used. Default will be YES.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFActionOptionCloseButtonKey

    Swift

    let PSPDFActionOptionCloseButtonKey: String
  • Constant to convert PSPDFActionType into NSString and back.

    Declaration

    Objective-C

    extern const PSPDFValueTransformerName _Nonnull PSPDFActionTypeTransformerName

    Swift

    static let actionTypeTransformerName: PSPDFValueTransformerName
  • Prefix used for all analytics events. pspdf. A underscore (_) is added after this prefix to all analytics events as well.

    Declaration

    Objective-C

    extern NSString *const PSPDFAnalyticsEventPrefix

    Swift

    let PSPDFAnalyticsEventPrefix: String
  • Notification posted on the main thread when new annotations are added to the default PSPDFFileAnnotationProvider. The notification object is an NSArray containing the new PSPDFAnnotations.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFAnnotationsAddedNotification

    Swift

    static let PSPDFAnnotationsAdded: NSNotification.Name
  • Notification posted on the main thread when annotations are removed from the default PSPDFFileAnnotationProvider. The notification object is an NSArray containing the removed PSPDFAnnotations.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFAnnotationsRemovedNotification

    Swift

    static let PSPDFAnnotationsRemoved: NSNotification.Name
  • Internal events to notify the annotation providers when annotations are being changed.

    Warning

    Only send from main thread! Don’t call save during a change notification.

    Note

    The notification’s object property is a PSPDFAnnotation instance.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFAnnotationChangedNotification

    Swift

    static let PSPDFAnnotationChanged: NSNotification.Name
  • Set to YES to disable handling by views.

    Declaration

    Objective-C

    extern NSString
        *const _Nonnull PSPDFAnnotationChangedNotificationIgnoreUpdateKey

    Swift

    let PSPDFAnnotationChangedNotificationIgnoreUpdateKey: String
  • NSArray of selector names.

    Note

    Properties will be prefixed with ‘is’ in Objective-C. For example, the deleted property becomes isDeleted.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFAnnotationChangedNotificationKeyPathKey

    Swift

    let PSPDFAnnotationChangedNotificationKeyPathKey: String
  • Controls if overlay annotations should be animated. Only applies to overlay. Defaults to YES if not explicitly set to NO.

    Note

    This is defined on the model layer to allow passing through animated: parameters.

    Declaration

    Objective-C

    extern const PSPDFAnnotationOption _Nonnull PSPDFAnnotationOptionAnimateViewKey

    Swift

    static let animateViewKey: PSPDFAnnotationOption
  • Prevents the insertion or removal notifications from being sent (use a BOOL NSNumber value).

    Declaration

    Objective-C

    extern const PSPDFAnnotationOption _Nonnull PSPDFAnnotationOptionSuppressNotificationsKey

    Swift

    static let suppressNotificationsKey: PSPDFAnnotationOption
  • Fired whenever the toolbar visibility changes.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFAnnotationToolbarControllerVisibilityDidChangeNotification

    Swift

    static let PSPDFAnnotationToolbarControllerVisibilityDidChange: NSNotification.Name
  • Key inside the notification’s userInfo.

    Declaration

    Objective-C

    extern NSString
        *const _Nonnull PSPDFAnnotationToolbarControllerVisibilityAnimatedKey

    Swift

    let PSPDFAnnotationToolbarControllerVisibilityAnimatedKey: String
  • Notification sent out after appearanceMode is changed.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFAppearanceModeChangedNotification

    Swift

    static let PSPDFAppearanceModeChanged: NSNotification.Name
  • Notification userInfo dictionary key. Holds a BOOL NSNumber which is YES when an animated mode change was requested.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFAppearanceModeChangedAnimatedKey

    Swift

    let PSPDFAppearanceModeChangedAnimatedKey: String
  • Notification posted on the main thread whenever detected is set to YES even if it was YES before.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFApplePencilDetectedNotification

    Swift

    static let PSPDFApplePencilDetected: NSNotification.Name
  • Notification posted on the main thread whenever detected changes value.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFApplePencilDetectedChangedNotification

    Swift

    static let PSPDFApplePencilDetectedChanged: NSNotification.Name
  • Register to get notified when the bookmarks managed by the bookmark manager posting this notification change.

    A change is defined as adding, removing, or replacing a bookmark or changing its sort order.

    This notification is guaranteed to be posted on the main thread.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFBookmarksChangedNotification

    Swift

    static let PSPDFBookmarksChanged: NSNotification.Name
  • The priority with which the filterElement is centered inside the filter view.

    Declaration

    Objective-C

    static const UILayoutPriority PSPDFCollectionReusableFilterViewCenterPriority =
        UILayoutPriorityDefaultHigh - 10

    Swift

    static let PSPDFCollectionReusableFilterViewCenterPriority: UILayoutPriority
  • The default minimum margin of the filterElement

    Declaration

    Objective-C

    static const CGFloat PSPDFCollectionReusableFilterViewDefaultMargin = 8

    Swift

    let PSPDFCollectionReusableFilterViewDefaultMargin: CGFloat
  • Use on searchResultZoomScale for an automatic scale mode that makes text readable in most cases.

    Declaration

    Objective-C

    extern const CGFloat PSPDFAutomaticSearchResultZoomScale

    Swift

    let PSPDFAutomaticSearchResultZoomScale: CGFloat
  • Pre-provided activity that shows the open in view controller.

    Declaration

    Objective-C

    extern const UIActivityType _Nonnull PSPDFActivityTypeOpenIn

    Swift

    static let PSPDFActivityTypeOpenIn: UIActivity.ActivityType
  • Undocumented

    Declaration

    Objective-C

    PSPDF_EXPORT NSString *const PSPDFCryptorErrorDomain
  • Search glyphs.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsGlyphsKey

    Swift

    let PSPDFObjectsGlyphsKey: String
  • Always return full PSPDFWords. Implies PSPDFObjectsTextKey.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsWordsKey

    Swift

    let PSPDFObjectsWordsKey: String
  • Include Text.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsTextKey

    Swift

    let PSPDFObjectsTextKey: String
  • Include text blocks, sorted after most appropriate.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsTextBlocksKey

    Swift

    let PSPDFObjectsTextBlocksKey: String
  • Include Image info.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsImagesKey

    Swift

    let PSPDFObjectsImagesKey: String
  • Output category for annotations.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsAnnotationsKey

    Swift

    let PSPDFObjectsAnnotationsKey: String
  • Ignore too large text blocks (that are > 90% of a page)

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsIgnoreLargeTextBlocksKey

    Swift

    let PSPDFObjectsIgnoreLargeTextBlocksKey: String
  • Include annotations of attached type

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsAnnotationTypesKey

    Swift

    let PSPDFObjectsAnnotationTypesKey: String
  • Special case; used for PSPDFAnnotationTypeNote hit testing.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsAnnotationPageBoundsKey

    Swift

    let PSPDFObjectsAnnotationPageBoundsKey: String
  • Special case; Used to correctly hit test zoom-invariant annotations.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsPageZoomLevelKey

    Swift

    let PSPDFObjectsPageZoomLevelKey: String
  • Include annotations that are part of a group.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsAnnotationIncludedGroupedKey

    Swift

    let PSPDFObjectsAnnotationIncludedGroupedKey: String
  • Will sort words/annotations (smaller words/annotations first). Use for touch detection.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsSmartSortKey

    Swift

    let PSPDFObjectsSmartSortKey: String
  • Will use path-based hit-testing based on the center point if set. All annotations that support path based hit-testing but fail the test will be excluded from the results.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectMinDiameterKey

    Swift

    let PSPDFObjectMinDiameterKey: String
  • Will look at the text flow and select full sentences, not just what’s within the rect.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsTextFlowKey

    Swift

    let PSPDFObjectsTextFlowKey: String
  • Will stop after finding the first matching object.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsFindFirstOnlyKey

    Swift

    let PSPDFObjectsFindFirstOnlyKey: String
  • Only relevant for rect. Will test for intersection instead of objects that are fully included in the pdfRect. Defaults to YES if not set.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFObjectsTestIntersectionKey

    Swift

    let PSPDFObjectsTestIntersectionKey: String
  • The notification posted when a checkpoint is saved. The object sending this is the document’s checkpointer.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFDocumentCheckpointSavedNotification

    Swift

    static let PSPDFDocumentCheckpointSaved: NSNotification.Name
  • The key set in PSPDFDocumentCheckpointSavedNotification‘s userInfo that indicates (using a BOOL wrapped in a NSNumber) whether the checkpoint saved successfully or not.

    Declaration

    Objective-C

    extern NSString
        *const _Nonnull PSPDFDocumentCheckpointSavedNotificationSucessKey

    Swift

    let PSPDFDocumentCheckpointSavedNotificationSucessKey: String
  • Fired whenever the toolbar visibility changes.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFDocumentEditorToolbarControllerVisibilityDidChangeNotification

    Swift

    static let PSPDFDocumentEditorToolbarControllerVisibilityDidChange: NSNotification.Name
  • Key inside the notification’s userInfo.

    Declaration

    Objective-C

    extern NSString
        *const _Nonnull PSPDFDocumentEditorToolbarControllerVisibilityAnimatedKey

    Swift

    let PSPDFDocumentEditorToolbarControllerVisibilityAnimatedKey: String
  • The constant to be used to indicate that the key length should be determined automatically.

    Declaration

    Objective-C

    extern const NSUInteger PSPDFDocumentSecurityOptionsKeyLengthAutomatic

    Swift

    let PSPDFDocumentSecurityOptionsKeyLengthAutomatic: UInt
  • The XMP PDF namespace.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFXMPPDFNamespace

    Swift

    let PSPDFXMPPDFNamespace: String
  • The XMP PDF namespace prefix.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFXMPPDFNamespacePrefix

    Swift

    let PSPDFXMPPDFNamespacePrefix: String
  • The XMP Dublin Core namespace.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFXMPDCNamespace

    Swift

    let PSPDFXMPDCNamespace: String
  • The XMP Dublin Core namespace prefix.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFXMPDCNamespacePrefix

    Swift

    let PSPDFXMPDCNamespacePrefix: String
  • Posted whenever a task starts loading.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFDownloadManagerDidStartLoadingTaskNotification

    Swift

    static let PSPDFDownloadManagerDidStartLoadingTask: NSNotification.Name
  • Posted whenever a task finishes loading.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFDownloadManagerDidFinishLoadingTaskNotification

    Swift

    static let PSPDFDownloadManagerDidFinishLoadingTask: NSNotification.Name
  • Posted whenever a task failed to load.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFDownloadManagerDidFailToLoadTaskNotification

    Swift

    static let PSPDFDownloadManagerDidFailToLoadTask: NSNotification.Name
  • The PSPDFKit Error Domain.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFErrorDomain

    Swift

    let PSPDFErrorDomain: String
  • Notification when someone pressed Clear Field.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFFormInputAccessoryViewDidPressClearButtonNotification

    Swift

    static let PSPDFFormInputAccessoryViewDidPressClearButton: NSNotification.Name
  • Notification when someone presses Clear.

    Declaration

    Objective-C

    extern const NSNotificationName _Nonnull PSPDFFreeTextAccessoryViewDidPressClearButtonNotification

    Swift

    static let PSPDFFreeTextAccessoryViewDidPressClearButton: NSNotification.Name
  • String. The type of an item.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryItemTypeKey

    Swift

    let PSPDFGalleryItemTypeKey: String
  • String. The content URL of an item.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryItemContentURLKey

    Swift

    let PSPDFGalleryItemContentURLKey: String
  • String. The caption of an item.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryItemCaptionKey

    Swift

    let PSPDFGalleryItemCaptionKey: String
  • String. The options of an item.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryItemOptionsKey

    Swift

    let PSPDFGalleryItemOptionsKey: String
  • Boolean. Indicates if the content should automatically start playing.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionAutoplay

    Swift

    let PSPDFGalleryOptionAutoplay: String
  • Boolean. Indicates if controls should be displayed.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionControls

    Swift

    let PSPDFGalleryOptionControls: String
  • Boolean. Indicates if the content should loop forever.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionLoop

    Swift

    let PSPDFGalleryOptionLoop: String
  • Boolean. Indicates that the content can be presented fullscreen.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionFullscreen

    Swift

    let PSPDFGalleryOptionFullscreen: String
  • Undocumented

    Declaration

    Objective-C

    PSPDF_EXPORT NSErrorDomain const PSPDFGalleryManifestErrorDomain

    Swift

    let PSPDFGalleryManifestErrorDomain: String
  • NSString. Indicates the cover mode.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionCoverMode

    Swift

    let PSPDFGalleryOptionCoverMode: String
  • NSURL. Indicates which image should be presented as a cover view.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionCoverImage

    Swift

    let PSPDFGalleryOptionCoverImage: String
  • NSNumber. The time in the video where the preview should be captured.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionCoverPreviewCaptureTime

    Swift

    let PSPDFGalleryOptionCoverPreviewCaptureTime: String
  • NSArray. The preferred video qualities.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionPreferredVideoQualities

    Swift

    let PSPDFGalleryOptionPreferredVideoQualities: String
  • NSNumber. The start time of the video.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionStartTime

    Swift

    let PSPDFGalleryOptionStartTime: String
  • NSNumber. The end time of the video.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFGalleryOptionEndTime

    Swift

    let PSPDFGalleryOptionEndTime: String
  • Default padding factor added to the glyph rects in PSPDFBoundingBoxFromGlyphs and PSPDFRectsFromGlyphs to improve selection appearance. The padding factor is multiplied by the frame height and the width and height extended by that value.

    Declaration

    Objective-C

    extern const CGFloat PSPDFDefaultTextPaddingFactor

    Swift

    let PSPDFDefaultTextPaddingFactor: CGFloat
  • Undocumented

    Declaration

    Objective-C

    PSPDF_EXPORT const NSRange PSPDFInvalidGlyphRange

    Swift

    let PSPDFInvalidGlyphRange: NSRange
  • Domain for errors encountered by PSPDFKit Instant.

    Declaration

    Objective-C

    extern const NSErrorDomain _Nonnull PSPDFInstantErrorDomain

    Swift

    let PSPDFInstantErrorDomain: String
  • Key for NSError userInfo for the PSPDFInstantDocumentDescriptorDescriptor an error relates to, if applicable.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFInstantErrorDocumentDescriptorKey

    Swift

    let PSPDFInstantErrorDocumentDescriptorKey: String
  • Key for NSError userInfo for the PSPDFDocument an error relates to, if applicable.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFInstantErrorDocumentKey

    Swift

    let PSPDFInstantErrorDocumentKey: String
  • Key for NSError userInfo for the annotation identifier an error relates to, if applicable.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFInstantErrorAnnotationIdentifierKey

    Swift

    let PSPDFInstantErrorAnnotationIdentifierKey: String
  • User info key for the (extended) SQLite error code as an NSNumber in the case of PSPDFInstantErrorDatabaseAccessFailed.

    A detailed discussions of these codes can be found at https://www.sqlite.org/rescode.html

    Note

    Important: This value can very well be nil! (Not all database access errors need to be SQLite errors.)

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFInstantErrorSQLiteExtendedErrorCodeKey

    Swift

    let PSPDFInstantErrorSQLiteExtendedErrorCodeKey: String
  • User info key for the detailed errors in the case of PSPDFInstantErrorCouldNotPurgeDiskCacheEntries.

    The value under this key is an NSDictionary<NSString *, NSError *> *, where each key represents a document ID that could not be purged, and the corresponding value captures the reason why this failed.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFInstantErrorPurgeErrorsByDocumentIDKey

    Swift

    let PSPDFInstantErrorPurgeErrorsByDocumentIDKey: String
  • User info key for the identifier of the attachment in the case of PSPDFInstantErrorAttachmentNotLoaded or PSPDFInstantErrorNoSuchAttachment.

    The value under this key is the identifier for the attachment that could not be accessed/fetched as an NSString.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFInstantErrorAttachmentIDKey

    Swift

    let PSPDFInstantErrorAttachmentIDKey: String
  • The annotation that caused an error.

    Declaration

    Objective-C

    extern NSString *const _Nonnull PSPDFInstantErrorAnnotationKey

    Swift

    let PSPDFInstantErrorAnnotationKey: String