PSPDFConfiguration


@interface PSPDFConfiguration
    : PSPDFBaseConfiguration <PSPDFConfigurationBuilder *>
<PSPDFOverridable> @end

A PSPDFConfiguration defines the behavior of a PSPDFViewController. It uses the builder pattern via PSPDFConfigurationBuilder to create an immutable copy via a block.

  • Set a page mode defined in the enum. Defaults to PSPDFPageModeAutomatic. Reloads the view, unless it is set while rotation is active. Thus, one can customize the size change behavior by setting this within a size transition animation block. Ignored when pageTransition is set to PSPDFPageTransitionScrollContinuous.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFPageMode pageMode;

    Swift

    var pageMode: PSPDFPageMode { get }
  • Defines the page transition. Defaults to PSPDFPageTransitionScrollPerSpread. - warning: If you change the property dynamically in viewWillTransitionToSize:withTransitionCoordinator:, wait for the transition to finish using the coordinator’s completion block, otherwise the controller will get in an invalid state. Child view controllers get rotation events AFTER the parent view controller, so if you’re changing this from a parent viewController, for PSPDFKit the rotation hasn’t been completed yet, and your app will eventually crash. In that case, use a dispatch_async(dispatch_get_main_queue(), ^{ ... }); to set. You might just want to set updateSettingsForBoundsChangeBlock and set your properties there. - note: , we enable the automaticallyAdjustsScrollViewInsets by default. If you don’t want this behavior, subclass reloadData and set this property to NO.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFPageTransition pageTransition;

    Swift

    var pageTransition: PSPDFPageTransition { get }
  • Shows first document page alone. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, getter=isFirstPageAlwaysSingle, nonatomic)
        BOOL firstPageAlwaysSingle;

    Swift

    var isFirstPageAlwaysSingle: Bool { get }
  • Controls whether spreads can grow larger than the actual view.

    This can be helpful on smaller screens to make the content more readable. - note: This property has no effect if the page transition is anything but PSPDFPageTransitionScrollPerSpread or PSPDFPageTransitionScrollContinuous.

    Defaults to PSPDFConfigurationSpreadFittingAdaptive.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFConfigurationSpreadFitting spreadFitting;

    Swift

    var spreadFitting: PSPDFConfigurationSpreadFitting { get }
  • Only useful for PSPDFPageTransitionCurl. Clips the page to its boundaries, not showing a pageCurl on empty background. Defaults to YES. Set to NO if your document is variably sized.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL clipToPageBoundaries;

    Swift

    var clipToPageBoundaries: Bool { get }
  • Enable/disable page shadow. Defaults to NO.

    Declaration

    Objective-C

    @property (readonly, getter=isShadowEnabled, nonatomic) BOOL shadowEnabled;

    Swift

    var isShadowEnabled: Bool { get }
  • Set default shadowOpacity. Defaults to 0.7f.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat shadowOpacity;

    Swift

    var shadowOpacity: CGFloat { get }
  • Background color behind the page view. Defaults to a dark gray color.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UIColor *_Nonnull backgroundColor;

    Swift

    var backgroundColor: NSColor { get }
  • Allowed appearance modes for PSPDFBrightnessViewController. Defaults to PSPDFAppearanceModeAll. PSPDFAppearanceModeDefault is always assumed to be available. Set to only PSPDFAppearanceModeDefault to disable appearance mode picker UI. This needs to be set before PSPDFBrightnessViewController is presented.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFAppearanceMode allowedAppearanceModes;

    Swift

    var allowedAppearanceModes: PSPDFAppearanceMode { get }
  • Page scrolling direction. Defaults to PSPDFScrollDirectionHorizontal. Only relevant for scrolling page transitions.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFScrollDirection scrollDirection;

    Swift

    var scrollDirection: PSPDFScrollDirection { get }
  • Sets the scroll view inset adjustment mode. Defaults to PSPDFScrollInsetAdjustmentFixedElements. This is only evaluated for PSPDFPageTransitionScrollContinuous & PSPDFScrollDirectionVertical. - note: This is similar to automaticallyAdjustsScrollViewInsets but more tailored to PSPDFKit’s use case. - warning: UIViewController’s automaticallyAdjustsScrollViewInsets will always be disabled. Don’t enable this property.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFScrollInsetAdjustment scrollViewInsetAdjustment;

    Swift

    var scrollViewInsetAdjustment: PSPDFScrollInsetAdjustment { get }
  • Minimum zoom scale. Defaults to 1. You usually don’t want to change this.

    Warning

    This might break certain page transitions if not set to 1.

    Declaration

    Objective-C

    @property (readonly, nonatomic) float minimumZoomScale;

    Swift

    var minimumZoomScale: Float { get }
  • Maximum zoom scale for the scrollview. Defaults to 20.

    Declaration

    Objective-C

    @property (readonly, nonatomic) float maximumZoomScale;

    Swift

    var maximumZoomScale: Float { get }
  • If YES, shows an UIActivityIndicatorView on the top right while page is rendering. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, getter=isRenderAnimationEnabled, nonatomic)
        BOOL renderAnimationEnabled;

    Swift

    var isRenderAnimationEnabled: Bool { get }
  • Position of render status view. Defaults to PSPDFRenderStatusViewPositionTop.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFRenderStatusViewPosition renderStatusViewPosition;

    Swift

    var renderStatusViewPosition: PSPDFRenderStatusViewPosition { get }
  • The action that happens when the user double taps somewhere in the document. Defaults to PSPDFTapActionSmartZoom.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFTapAction doubleTapAction;

    Swift

    var doubleTapAction: PSPDFTapAction { get }
  • If set to YES, automatically focuses on selected form elements. Defaults to NO.

    Declaration

    Objective-C

    @property (readonly, getter=isFormElementZoomEnabled, nonatomic)
        BOOL formElementZoomEnabled;

    Swift

    var isFormElementZoomEnabled: Bool { get }
  • Tap on begin/end of page scrolls to previous/next page. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, getter=isScrollOnTapPageEndEnabled, nonatomic)
        BOOL scrollOnTapPageEndEnabled;

    Swift

    var isScrollOnTapPageEndEnabled: Bool { get }
  • Page transition to next or previous page via scrollOnTapPageEndEnabled is enabled. Defaults to YES. - warning: Only effective if scrollOnTapPageEndEnabled is set to YES.

    Declaration

    Objective-C

    @property (readonly, getter=isScrollOnTapPageEndAnimationEnabled, nonatomic)
        BOOL scrollOnTapPageEndAnimationEnabled;

    Swift

    var isScrollOnTapPageEndAnimationEnabled: Bool { get }
  • Margin at which the scroll to next/previous tap should be invoked. Defaults to 60.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat scrollOnTapPageEndMargin;

    Swift

    var scrollOnTapPageEndMargin: CGFloat { get }
  • Set the default link action for pressing on PSPDFLinkAnnotations. Default is PSPDFLinkActionInlineBrowser. - note: If modal is set in the link, this property has no effect.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFLinkAction linkAction;

    Swift

    var linkAction: PSPDFLinkAction { get }
  • May be used to customize other displayed menu actions when text is selected. Defaults to PSPDFTextSelectionMenuActionSearch|PSPDFTextSelectionMenuActionDefine|PSPDFTextSelectionMenuActionSpeak.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFTextSelectionMenuAction allowedMenuActions;

    Swift

    var allowedMenuActions: PSPDFTextSelectionMenuAction { get }
  • Allows text selection. Defaults to YES. - note: Requires the PSPDFFeatureMaskTextSelection feature flag. This implies that the PDF file actually contains text glyphs. Sometimes text is represented via embedded images or vectors, in that case PSPDFKit can’t select it.

    Declaration

    Objective-C

    @property (readonly, getter=isTextSelectionEnabled, nonatomic)
        BOOL textSelectionEnabled;

    Swift

    var isTextSelectionEnabled: Bool { get }
  • Allows image selection. Defaults to YES. - note: Requires the PSPDFFeatureMaskTextSelection feature flag. This implies that the image is not in vector format. Only supports a subset of all possible image types in PDF. - warning: Will only work if textSelectionEnabled is also set to YES.

    Declaration

    Objective-C

    @property (readonly, getter=isImageSelectionEnabled, nonatomic)
        BOOL imageSelectionEnabled;

    Swift

    var isImageSelectionEnabled: Bool { get }
  • Defines how the text is selected. Defaults to PSPDFTextSelectionModeRegular.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFTextSelectionMode textSelectionMode;

    Swift

    var textSelectionMode: PSPDFTextSelectionMode { get }
  • Enable to always try to snap to words when selecting text. Defaults to NO.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL textSelectionShouldSnapToWord;

    Swift

    var textSelectionShouldSnapToWord: Bool { get }
  • Modify what annotations are editable and can be created. Set to nil to completely disable annotation editing/creation. Defaults to all available annotation strings with the exception of PSPDFAnnotationStringLink.

    Warning

    Some annotation types are only behaviorally different in PSPDFKit but are mapped to basic annotation types, so adding those will only change the creation of those types, not editing. Example: If you add PSPDFAnnotationStringInk but not PSPDFAnnotationStringSignature, signatures added in previous session will still be editable (since they are Ink annotations). On the other hand, if you set PSPDFAnnotationStringSignature but not PSPDFAnnotationStringInk, then your newly created signatures will not be movable. See PSPDFAnnotation.h for additional comments.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        NSSet<PSPDFAnnotationString> *_Nonnull editableAnnotationTypes;

    Swift

    var editableAnnotationTypes: Set
  • Shows a custom cell with configurable color presets for the provided annotation types. Defaults to PSPDFAnnotationTypeAll. Set to PSPDFAnnotationTypeNone to completely disable color presets. - note: The presets are only displayed if the PSPDFStyleManager returns supported annotation types only.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFAnnotationType typesShowingColorPresets;

    Swift

    var typesShowingColorPresets: PSPDFAnnotationType { get }
  • Customize the inspector items globally. This currently affects PSPDFAnnotationStyleViewController and PSPDFFreeTextAccessoryView. Dictionary in format annotation type string : array of arrays of property strings (NSArray<NSArray<PSPDFAnnotationString> *> *) OR a block that returns this and takes annotations as argument (NSArray<NSArray<PSPDFAnnotationString> *> *(^block)(PSPDFAnnotation *annotation)). The following properties are currently supported: color, fillColor, alpha, lineWidth, lineEnd1, lineEnd2, fontName, fontSize, textAlignment, lineEnd. - note: If you want to disable all color editing, be sure to also remove the relevant type from typesShowingColorPresets (also available in PSPDFConfiguration).

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        NSDictionary<PSPDFAnnotationString, id> *_Nonnull propertiesForAnnotations;

    Swift

    var propertiesForAnnotations: [PSPDFAnnotationString : Any] { get }
  • Shows a toolbar with text editing options (PSPDFFreeTextAccessoryView) above the keyboard, while editing free text annotations. Defaults to YES. You need to set this property before the text annotation is edited.

    Declaration

    Objective-C

    @property (readonly, getter=isFreeTextAccessoryViewEnabled, nonatomic)
        BOOL freeTextAccessoryViewEnabled;

    Swift

    var isFreeTextAccessoryViewEnabled: Bool { get }
  • Controls how bookmarks are displayed and managed. While bookmarks have a custom order, the default is set to PSPDFBookmarkManagerSortOrderPageBased.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFBookmarkManagerSortOrder bookmarkSortOrder;

    Swift

    var bookmarkSortOrder: PSPDFBookmarkManagerSortOrder { get }
  • Sets the page’s bookmark indicator mode. Defaults to PSPDFPageBookmarkIndicatorModeOff. Depending on this mode, a button indicating the current bookmark status of the page will be displayed on the page itself. Tapping the button will toggle the bookmark mode. For customising the bookmark indicator, see PSPDFBookMarkIndicatorButton.h - see: bookmarkIndicatorInteractionEnabled

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFPageBookmarkIndicatorMode bookmarkIndicatorMode;

    Swift

    var bookmarkIndicatorMode: PSPDFPageBookmarkIndicatorMode { get }
  • Enables/disables the bookmark indicator’s interaction. Defaults to YES. If this is enabled, tapping the indicator will bookmark on unbookmark the page it is displayed on. Use this in conjunction with bookmarkIndicatorMode to get the desired behaviour - see: bookmarkIndicatorMode

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL bookmarkIndicatorInteractionEnabled;

    Swift

    var bookmarkIndicatorInteractionEnabled: Bool { get }
  • Manages the show/hide mode of the user interface view. Defaults to PSPDFUserInterfaceViewModeAutomatic. - note: The user interface view consists of the thumbnail view at the bottom and the page/document label. The visibility of the navigation bar of the parent navigation controller can be linked to the user interface via enabling shouldHideNavigationBarWithUserInterface. - warning: The user interface view will not change when changing this mode after controller is visible. Use setUserInterfaceVisible:animated: instead. Does not affect manual calls to setUserInterfaceVisible.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFUserInterfaceViewMode userInterfaceViewMode;

    Swift

    var userInterfaceViewMode: PSPDFUserInterfaceViewMode { get }
  • Sets the way the user interface view will be animated. Defaults to PSPDFUserInterfaceViewAnimationFade.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFUserInterfaceViewAnimation userInterfaceViewAnimation;

    Swift

    var userInterfaceViewAnimation: PSPDFUserInterfaceViewAnimation { get }
  • Enables/Disables the bottom document site position overlay. Defaults to YES. Animatable. Will be added to the userInterfaceView. - note: Requires a setNeedsLayout on PSPDFUserInterfaceView to update if there’s no full reload.

    Declaration

    Objective-C

    @property (readonly, getter=isPageLabelEnabled, nonatomic) BOOL pageLabelEnabled;

    Swift

    var isPageLabelEnabled: Bool { get }
  • Enable/disable the top document label overlay. Defaults to PSPDFAdaptiveConditionalAdaptive - the document label is shown if there’s not enough space to set the navigation bar title instead. - note: Requires a setNeedsLayout on the PSPDFViewController view to update if there’s no full reload.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFAdaptiveConditional documentLabelEnabled;

    Swift

    var documentLabelEnabled: PSPDFAdaptiveConditional { get }
  • Automatically hides the user interface when the user starts scrolling to different pages in the document. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldHideUserInterfaceOnPageChange;

    Swift

    var shouldHideUserInterfaceOnPageChange: Bool { get }
  • Should show the user interface view on viewWillAppear:, unless the user interface is disabled. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldShowUserInterfaceOnViewWillAppear;

    Swift

    var shouldShowUserInterfaceOnViewWillAppear: Bool { get }
  • Controls whether a PSPDFViewController should show a page grabber on the edge of the screen to enable the user to quickly skim through the pages of a document.

    Defaults to NO.

    Declaration

    Objective-C

    @property (readonly, getter=isPageGrabberEnabled, nonatomic)
        BOOL pageGrabberEnabled;

    Swift

    var isPageGrabberEnabled: Bool { get }
  • Allow PSPDFKit to change the title of this view controller. If YES, the controller title will be set to the document title or nil, depending on whether the document label is visible or not. Set to NO, to manage the viewController title manually. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL allowToolbarTitleChange;

    Swift

    var allowToolbarTitleChange: Bool { get }
  • If YES, the navigation bar will be hidden when the user interface is hidden. If NO, the navigation will stay shown or hidden depending on the value of [UINavigationController navigationBarHidden]. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldHideNavigationBarWithUserInterface;

    Swift

    var shouldHideNavigationBarWithUserInterface: Bool { get }
  • If YES, the status bar will always remain hidden (regardless of the shouldHideStatusBarWithUserInterface setting). The setting is also passed on to internally created sub-controllers. Defaults to NO.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldHideStatusBar;

    Swift

    var shouldHideStatusBar: Bool { get }
  • If YES, the status bar will be hidden when the user interface is hidden. Defaults to YES. - note: Needs to be set before the view is loaded. - note: This setting is ignored when the navigation bar is always visible (shouldHideNavigationBarWithUserInterface and [UINavigationController navigationBarHidden] both set to NO).

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldHideStatusBarWithUserInterface;

    Swift

    var shouldHideStatusBarWithUserInterface: Bool { get }
  • Shows a floating back button in the lower part of the screen. Used to navigate back to the origin page when navigating via PDF actions. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL showBackActionButton;

    Swift

    var showBackActionButton: Bool { get }
  • Shows a floating forward button in the lower part of the screen. Used to revert the back button navigation action. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL showForwardActionButton;

    Swift

    var showForwardActionButton: Bool { get }
  • Adds text labels representing the destination name to the back and forward buttons. Defaults to YES on iPad and NO otherwise.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL showBackForwardActionButtonLabels;

    Swift

    var showBackForwardActionButtonLabels: Bool { get }
  • Sets the thumbnail bar mode. Defaults to PSPDFThumbnailBarModeScrubberBar. - note: Requires a setNeedsLayout on PSPDFUserInterfaceView to update if there’s no full reload.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFThumbnailBarMode thumbnailBarMode;

    Swift

    var thumbnailBarMode: PSPDFThumbnailBarMode { get }
  • Controls the placement of the scrubber bar. Defaults to PSPDFScrubberBarTypeHorizontal.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFScrubberBarType scrubberBarType;

    Swift

    var scrubberBarType: PSPDFScrubberBarType { get }
  • Controls the thumbnail grouping. Defaults to PSPDFThumbnailGroupingAutomatic.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFThumbnailGrouping thumbnailGrouping;

    Swift

    var thumbnailGrouping: PSPDFThumbnailGrouping { get }
  • The thumbnail size for PSPDFThumbnailViewController. Defaults to CGSizeZero. If one of the width or height is zero, this dimension will be determined from the page aspect ratio. If both the width and height are zero, the size is automatic and adaptive, based on the page sizes and view size.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGSize thumbnailSize;

    Swift

    var thumbnailSize: CGSize { get }
  • The minimum internal horizontal space between thumbnails in PSPDFThumbnailViewController. The default depends on the screen size, and is the same as thumbnailLineSpacing and each element in thumbnailMargin.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat thumbnailInteritemSpacing;

    Swift

    var thumbnailInteritemSpacing: CGFloat { get }
  • The minimum internal vertical space between thumbnails in PSPDFThumbnailViewController. The default depends on the screen size, and is the same as thumbnailInteritemSpacing and each element in thumbnailMargin.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat thumbnailLineSpacing;

    Swift

    var thumbnailLineSpacing: CGFloat { get }
  • The external margin around the grid of thumbnails in thumbnail view mode. The default depends on the screen size, with all elements the same as thumbnailInteritemSpacing and thumbnailLineSpacing.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UIEdgeInsets thumbnailMargin;

    Swift

    var thumbnailMargin: NSEdgeInsets { get }
  • Overlay annotations are faded in. Set global duration for this fade here. Defaults to 0.25.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat annotationAnimationDuration;

    Swift

    var annotationAnimationDuration: CGFloat { get }
  • If set to YES, you can group/ungroup annotations with the multi-select tool. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL annotationGroupingEnabled;

    Swift

    var annotationGroupingEnabled: Bool { get }
  • If set to YES, a long-tap that ends on a page area that is not a text/image will show a new menu to create annotations. Defaults to YES. If set to NO, there’s no menu displayed and the loupe is simply hidden. Menu can be intercepted and customized with the shouldShowMenuItems:atSuggestedTargetRect:forAnnotation:inRect:onPageView: delegate. (when annotation is nil) - note: Requires the PSPDFFeatureMaskAnnotationEditing feature flag.

    Declaration

    Objective-C

    @property (readonly, getter=isCreateAnnotationMenuEnabled, nonatomic)
        BOOL createAnnotationMenuEnabled;

    Swift

    var isCreateAnnotationMenuEnabled: Bool { get }
  • Types allowed in the create annotations menu. Defaults to the most common annotation types. (strings) Contains a list of PSPDFAnnotationGroup and PSPDFAnnotationGroupItem items. - note: There is no visual separation for different groups. Types that are not listed in editableAnnotationTypes will be ignored.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSArray<PSPDFAnnotationGroup *> *_Nonnull createAnnotationMenuGroups;

    Swift

    var createAnnotationMenuGroups: [PSPDFAnnotationGroup] { get }
  • Enables natural drawing for ink annotations. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL naturalDrawingAnnotationEnabled;

    Swift

    var naturalDrawingAnnotationEnabled: Bool { get }
  • Defines how ink annotations are created.

    The PDF spec allows an unlimited number of separate paths per ink annotation object. They all need to have the same color and width.

    Defaults to PSPDFDrawCreateModeMergeIfPossible, where we try to create as few objects as possible.

    With PSPDFDrawCreateModeSeparate separate ink annotation objects will be created with each individual stroke.

    Note

    This does not affect undo - undo is smart and tracks paths individually.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFDrawCreateMode drawCreateMode;

    Swift

    var drawCreateMode: PSPDFDrawCreateMode { get }
  • If YES, the annotation menu will be displayed after an annotation has been created. Defaults to NO.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL showAnnotationMenuAfterCreation;

    Swift

    var showAnnotationMenuAfterCreation: Bool { get }
  • If YES, asks the user to specify a custom annotation username (author) when first creating a new annotation

    This is triggered by the PSPDFAnnotationStateManager changing its state.

    A default name will already be suggested based on the device name. You can change the default username by setting -[PSPDFDocument defaultAnnotationUsername]. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldAskForAnnotationUsername;

    Swift

    var shouldAskForAnnotationUsername: Bool { get }
  • Controls if a second tap to an annotation that allows inline editing enters edit mode. Defaults to YES. (The most probable candidate for this is PSPDFFreeTextAnnotation)

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        BOOL annotationEntersEditModeAfterSecondTapEnabled;

    Swift

    var annotationEntersEditModeAfterSecondTapEnabled: Bool { get }
  • Scrolls to affected page during an undo/redo operation. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldScrollToChangedPage;

    Swift

    var shouldScrollToChangedPage: Bool { get }
  • Controls the sound annotation player style. Defaults to PSPDFSoundAnnotationPlayerStyleBottom.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFSoundAnnotationPlayerStyle soundAnnotationPlayerStyle;

    Swift

    var soundAnnotationPlayerStyle: PSPDFSoundAnnotationPlayerStyle { get }
  • Controls if PSPDFKit should save at specific points, like when the app enters background or when the view controller disappears. Defaults to YES. Implement PSPDFDocumentDelegate to be notified of those saving actions.

    Declaration

    Objective-C

    @property (readonly, getter=isAutosaveEnabled, nonatomic) BOOL autosaveEnabled;

    Swift

    var isAutosaveEnabled: Bool { get }
  • The save method will be invoked when the view controller is dismissed. This increases controller dismissal if enabled. - note: Make sure that you don’t re-create the PSPDFDocument object if you enable background saving, else you might run into race conditions where the old object is still saving and the new one might load outdated/corrupted data. Defaults to NO.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL allowBackgroundSaving;

    Swift

    var allowBackgroundSaving: Bool { get }
  • Describes the time limit for recording sound annotations in seconds. After this time has been reached, the recording will stop.

    Defaults to 300 (= 5 minutes).

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSTimeInterval soundAnnotationTimeLimit;

    Swift

    var soundAnnotationTimeLimit: TimeInterval { get }
  • Defines the default options when a sound annotation is created for recording.

    Defaults to an empty dictionary in which case following set is used:

    AVFormatIDKey: @(kAudioFormatLinearPCM) AVSampleRateKey: @(annotation.rate) // 22050 AVNumberOfChannelsKey: @(annotation.channels) // 1 AVLinearPCMBitDepthKey: @(annotation.bits) // 16

    Make sure to set a combination that are supported in - AVAudioRecorder - AVPlayer - The PDF Specification

    See

    PDF Reference 1.7, Chapter 13.3 Sounds and PSPDFSoundAnnotation for details.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        NSDictionary<NSString *, id> *_Nonnull soundAnnotationRecordingOptions;

    Swift

    var soundAnnotationRecordingOptions: [String : Any] { get }
  • Controls whether to display search results directly in a PDF, or as a list in a modal. Defaults to PSPDFSearchModeModal.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFSearchMode searchMode;

    Swift

    var searchMode: PSPDFSearchMode { get }
  • If a search result is selected, we scroll to the page to make it visible. Defaults to 2. If this is set to 1, no zooming is performed. Increase this to zoom to the search result. This value will be clamped by maximumZoomScale and should be set below. Values smaller than 1 will be clamped to 1 as well.

    Note

    This value will be used as a guidance. In case the zoom would be too large, we reduce the scale to ensure the object fits the screen.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat searchResultZoomScale;

    Swift

    var searchResultZoomScale: CGFloat { get }
  • Defines if a signature should be saved after creation. Defaults to PSPDFSignatureSavingStrategySaveIfSelected. Shows an action sheet when done creating a signature in PSPDFSignatureViewController, when set to PSPDFSignatureSavingStrategySaveIfSelected.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFSignatureSavingStrategy signatureSavingStrategy;

    Swift

    var signatureSavingStrategy: PSPDFSignatureSavingStrategy { get }
  • Defines if the user should be able to select certificates for digitally signing a document, when creating a new signature. Defaults to PSPDFSignatureCertificateSelectionModeIfAvailable.

    Will always show the certificate button on the signature creation UI, when set to PSPDFSignatureCertificateSelectionModeAlways. Will never show the certificate button on the signature creation UI, when set to PSPDFSignatureCertificateSelectionModeNever. Will only show the certificate button on the signature creation UI, when there are registeredSigners on the shared PSPDFSignatureManager, when set to PSPDFSignatureCertificateSelectionModeIfAvailable. This is the default mode.

    Note

    Needs to have Digital Signatures licensed, will be ignored otherwise.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFSignatureCertificateSelectionMode signatureCertificateSelectionMode;

    Swift

    var signatureCertificateSelectionMode: PSPDFSignatureCertificateSelectionMode { get }
  • Defines which biometric properties, PSPDFSignatureBiometricProperties, should be stored in a digital signature, if one is created. Defaults to PSPDFSignatureBiometricPropertiesOptionAll.

    Note

    Needs to have Digital Signatures licensed, will be ignored otherwise.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFSignatureBiometricPropertiesOption signatureBiometricPropertiesOptions;

    Swift

    var signatureBiometricPropertiesOptions: PSPDFSignatureBiometricPropertiesOption { get }
  • Enables natural drawing for signatures. Defaults to YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL naturalSignatureDrawingEnabled;

    Swift

    var naturalSignatureDrawingEnabled: Bool { get }
  • The default signature store implementation. Defaults to PSPDFKeychainSignatureStore.

    Declaration

    Objective-C

    @property (readonly, nonatomic) id<PSPDFSignatureStore> _Nonnull signatureStore;
  • Enable/Disable all internal gesture recognizers. Defaults to YES. Can be useful if you’re doing custom drawing on the PSPDFPageView.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL internalTapGesturesEnabled;

    Swift

    var internalTapGesturesEnabled: Bool { get }
  • Set this to true to allow this controller to access the parent navigationBar/navigationController to add custom buttons. Has no effect if there’s no parentViewController. Defaults to NO. - note: When using this feature, you should also implement both childViewControllerForStatusBarHidden and childViewControllerForStatusBarStyle to return the PSPDFViewController instance that is embedded.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL useParentNavigationBar;

    Swift

    var useParentNavigationBar: Bool { get }
  • If enabled, will request that all thumbnails are pre-cached in viewDidAppear:. Defaults to NO. Set this to YES if you want to precache thumbnails if you use the thumbnail view mode a lot. - warning: Does not delete any cache and doesn’t change if set after the controller has been presented.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldCacheThumbnails;

    Swift

    var shouldCacheThumbnails: Bool { get }