PDFConfiguration

Properties:
Name Type Attributes Description
scrollDirection PDFConfiguration.ScrollDirection <optional>
Configures the direction of page scrolling in the document view.
pageTransition PDFConfiguration.PageTransition <optional>
Configures the page scrolling mode. Note that curl mode is only available for iOS and will be ignored on Android.
documentPassword string <optional>
The password to unlock the document.
enableTextSelection PDFConfiguration.BooleanType <optional>
Allow / disallow text selection.
autosaveEnabled PDFConfiguration.BooleanType <optional>
Determines whether PSPDFKit should save automatically in response to [certain UI triggers][], such as the app entering the background or the view disappearing.
disableAutomaticSaving PDFConfiguration.BooleanType <optional>
Determines whether PSPDFKit should save automatically in response to certain UI triggers, such as the app entering the background or the view disappearing.
signatureSavingStrategy PDFConfiguration.SignatureSavingStrategy <optional>
Determines whether signatures should be saved after creation.
iOSShouldScrollToChangedPage PDFConfiguration.BooleanType <optional>
Scrolls to the affected page during an undo / redo operation.
iOSFormElementZoomEnabled PDFConfiguration.BooleanType <optional>
Option to automatically focus on selected form elements.
iOSImageSelectionEnabled PDFConfiguration.BooleanType <optional>
Allow / disallow image selection.
iOSTextSelectionShouldSnapToWord PDFConfiguration.BooleanType <optional>
Configure if text selection should snap to words.
iOSFreeTextAccessoryViewEnabled PDFConfiguration.BooleanType <optional>
Shows a toolbar with text editing options above the keyboard while editing free text annotations.
iOSInternalTapGesturesEnabled PDFConfiguration.BooleanType <optional>
Enable / disable all internal gesture recognizers.
iOSAllowBackgroundSaving PDFConfiguration.BooleanType <optional>
Determines whether automatic saving should happen on a background thread.
iOSMinimumZoomScale number <optional>
Minimum zoom scale for the scroll view.
iOSMaximumZoomScale number <optional>
Maximum zoom scale for the scroll view.
iOSDoubleTapAction PDFConfiguration.IOSDoubleTapAction <optional>
The action that happens when the user double taps somewhere in the document.
iOSTypesShowingColorPresets Array.<PDFConfiguration.IOSTypesShowingColorPresets> <optional>
Shows a custom cell with configurable color presets for the provided annotation types.
pageMode PDFConfiguration.PageMode <optional>
The document PageMode.
firstPageAlwaysSingle PDFConfiguration.BooleanType <optional>
Option to show the first page separately.
showPageLabels PDFConfiguration.BooleanType <optional>
Displays the current page number.
documentLabelEnabled PDFConfiguration.BooleanType <optional>
Shows an overlay displaying the document name.
spreadFitting PDFConfiguration.SpreadFitting <optional>
Controls the page fitting mode. adaptive mode only works on iOS and has no effect on Android.
invertColors PDFConfiguration.BooleanType <optional>
Inverts the document color if true.
androidGrayScale PDFConfiguration.BooleanType <optional>
Converts the document colors to grayscale.
iOSClipToPageBoundaries PDFConfiguration.BooleanType <optional>
Option to clip content to page boundaries.
iOSBackgroundColor any <optional>
Background color behind the page view.
iOSRenderAnimationEnabled PDFConfiguration.BooleanType <optional>
Shows a UIActivityIndicatorView in the top-right corner while the page is rendering.
iOSRenderStatusViewPosition PDFConfiguration.IOSRenderStatusViewPosition <optional>
Position of the render status view.
iOSAllowedAppearanceModes PDFConfiguration.IOSAllowedAppearanceModes <optional>
Allowed appearance modes for BrightnessViewController.
userInterfaceViewMode PDFConfiguration.UserInterfaceViewMode <optional>
Configures the user interface visibility.
inlineSearch PDFConfiguration.BooleanType <optional>
Sets the type of search bar to be inline or modular.
immersiveMode PDFConfiguration.BooleanType <optional>
Hides the user interface if set to true.
toolbarTitle string <optional>
Sets the title of the toolbar. Note: For iOS, you need to set documentLabelEnabled, iOSUseParentNavigationBar, and iOSAllowToolbarTitleChange to false in your configuration before setting the custom title.
androidShowSearchAction PDFConfiguration.BooleanType <optional>
Enables / disables document search functionality.
androidShowOutlineAction PDFConfiguration.BooleanType <optional>
Enables an outline menu in the activity.
androidShowBookmarksAction PDFConfiguration.BooleanType <optional>
Enables the display of bookmarks.
androidShowShareAction PDFConfiguration.BooleanType <optional>
Enables the display of share features.
androidShowPrintAction PDFConfiguration.BooleanType <optional>
Enables the printing option in the menu (if applicable) for the document and the device.
androidShowDocumentInfoView PDFConfiguration.BooleanType <optional>
Enables the display of document information.
androidShowSettingsMenu PDFConfiguration.BooleanType <optional>
Enables the display of the settings menu.
iOSShouldHideUserInterfaceOnPageChange PDFConfiguration.BooleanType <optional>
Option to hide / show the user interface when changing pages.
iOSShouldShowUserInterfaceOnViewWillAppear PDFConfiguration.BooleanType <optional>
Option to hide / show the user interface when the page appears.
iOSShouldHideStatusBarWithUserInterface PDFConfiguration.BooleanType <optional>
Option to hide / show the status bar with the user interface.
iOSShouldHideNavigationBarWithUserInterface PDFConfiguration.BooleanType <optional>
Option to hide / show the navigation bar with the user interface.
iOSSearchMode PDFConfiguration.IOSSearchMode <optional>
Sets the type of search bar to be inline or modal.
iOSScrollOnEdgeTapEnabled PDFConfiguration.BooleanType <optional>
Determines whether tapping on leading / trailing edges of the document view should trigger changing to the previous / next page.
iOSScrollOnEdgeTapMargin number <optional>
The margin in points from the view’s sides in which tapping should trigger scrolling to the previous / next page.
iOSUseParentNavigationBar PDFConfiguration.BooleanType <optional>
Set this to true to allow this controller to access the parent navigationBar / navigationController to add custom buttons.
iOSAllowToolbarTitleChange PDFConfiguration.BooleanType <optional>
Allow PSPDFKit to change the title of this view controller.
iOSShouldHideStatusBar PDFConfiguration.BooleanType <optional>
If true, the status bar will always remain hidden (regardless of the shouldHideStatusBarWithUserInterface setting).
iOSShowBackActionButton PDFConfiguration.BooleanType <optional>
Shows a floating back button in the lower part of the screen.
iOSShowForwardActionButton PDFConfiguration.BooleanType <optional>
Shows a floating forward button in the lower part of the screen.
iOSShowBackForwardActionButtonLabels PDFConfiguration.BooleanType <optional>
Adds text labels representing the destination name to the back and forward buttons.
iOSSearchResultZoomScale number <optional>
Increase this to zoom to the search result.
iOSAdditionalScrollViewFrameInsets any <optional>
Additional insets to apply to the document scroll view's frame.
iOSAdditionalContentInsets any <optional>
Additional insets to apply to the layout's content.
iOSAllowedMenuActions PDFConfiguration.IOSAllowedMenuActions <optional>
May be used to customize other displayed menu actions when text is selected.
iOSSettingsOptions Array.<PDFConfiguration.IOSSettingsOptions> <optional>
Options that will be presented by PDFSettingsViewController. Defaults to .default.
iOSShadowEnabled PDFConfiguration.BooleanType <optional>
Enable / disable page shadow.
iOSShadowOpacity number <optional>
Set the default shadowOpacity.
showThumbnailBar PDFConfiguration.ShowThumbnailBar <optional>
Thumbnail bar mode controls the display of page thumbnails viewing a document.
androidShowThumbnailGridAction PDFConfiguration.BooleanType <optional>
Displays an action bar icon to show a grid of thumbnail pages.
iOSScrubberBarType PDFConfiguration.IOSScrubberBarType <optional>
Controls the placement of the scrubber bar.
iOSThumbnailGrouping PDFConfiguration.IOSThumbnailGrouping <optional>
Option to set the grouping of thumbnails.
iOSThumbnailSize any <optional>
Configure the size of the thumbnail.
iOSThumbnailInteritemSpacing number <optional>
Configure the spacing between thumbnails.
iOSThumbnailLineSpacing number <optional>
Configure the line spacing of thumbnails.
iOSThumbnailMargin any <optional>
Configure the margin for thumbnails.
iOSShouldCacheThumbnails PDFConfiguration.BooleanType <optional>
Option to enable / disable thumbnail caching.
editableAnnotationTypes Array.<PDFConfiguration.EditableAnnotationTypes> <optional>
Set containing the annotation types that should be editable.
enableAnnotationEditing PDFConfiguration.BooleanType <optional>
Configuration to enable / disable editing all annotations. To selectively enable editing for specific types of annotations, use editableAnnotationTypes.
enableFormEditing PDFConfiguration.BooleanType <optional>
Enable / disable editing forms. This can also be accomplished by adding or removing the Widget annotation type from editableAnnotationTypes.
androidShowAnnotationListAction PDFConfiguration.BooleanType <optional>
Enables the list of annotations.
iOSShouldAskForAnnotationUsername PDFConfiguration.BooleanType <optional>
If true, asks the user to specify a custom annotation user name ("author") when creating a new annotation.
iOSLinkAction PDFConfiguration.IOSLinkAction <optional>
Sets the default link action for pressing on a LinkAnnotation.
iOSDrawCreateMode PDFConfiguration.IOSDrawCreateMode <optional>
Determines whether new annotations are created when strokes end.
iOSAnnotationGroupingEnabled PDFConfiguration.BooleanType <optional>
If set to true, you can group / ungroup annotations with the multi-select tool.
iOSNaturalDrawingAnnotationEnabled PDFConfiguration.BooleanType <optional>
Enables natural drawing for ink annotations.
iOSNaturalSignatureDrawingEnabled PDFConfiguration.BooleanType <optional>
Enables natural drawing for signatures.
iOSAnnotationEntersEditModeAfterSecondTapEnabled PDFConfiguration.BooleanType <optional>
Controls if a second tap to an annotation that allows inline editing enters edit mode.
iOSCreateAnnotationMenuEnabled PDFConfiguration.BooleanType <optional>
If set to true, a long tap that ends on a page area that isn’t a text / image will show a new menu to create annotations.
iOSAnnotationAnimationDuration number <optional>
Overlay annotations are faded in. Set the global duration for this fade here.
iOSSoundAnnotationTimeLimit number <optional>
Describes the time limit for recording sound annotations, in seconds.
iOSBookmarkSortOrder PDFConfiguration.IOSBookmarkSortOrder <optional>
Controls how bookmarks are displayed and managed.
enableInstantComments PDFConfiguration.BooleanType <optional>
Enable Instant comments.
listenToServerChanges PDFConfiguration.BooleanType <optional>
Listen for server changes automatically.
delay number <optional>
The delay before syncing with the Instant server.
syncAnnotations PDFConfiguration.BooleanType <optional>
Indicates whether document annotations should be synced with the Instant server.
measurementValueConfigurations Array.<Measurements.MeasurementValueConfiguration> <optional>
The array of MeasurementValueConfiguration objects that should be applied to the document.
remoteDocumentConfiguration PDFConfiguration.RemoteDocumentConfiguration <optional>
The configuration when downloading a document from a remote URL.
androidShowDefaultToolbar PDFConfiguration.BooleanType <optional>
Used to show or hide the main toolbar.
Source:

Members

(static, readonly) BooleanType :string

A convenience type to select Boolean options.
Type:
  • string
Properties:
Name Type Description
TRUE string Set the value to true.
FALSE string Set the value to false.
Source:

(static, readonly) EditableAnnotationTypes :string

The EditableAnnotationTypes options.
Type:
  • string
Properties:
Name Type Description
NONE string
UNDEFINED string
ALL string
LINK string
HIGHLIGHT string
UNDERLINE string
SQUIGGLY string
STRIKE_OUT string
TEXT string
CARET string
FREE_TEXT string
INK string
SQUARE string
CIRCLE string
LINE string
SIGNATURE string
STAMP string
ERASER string
IMAGE string
WIDGET string
FILE_ATTACHMENT string
SOUND string
POLYGON string
POLY_LINE string
RICH_MEDIA string
SCREEN string
POPUP string
WATERMARK string
TRAP_NET string
3D string
REDACT string
Source:

(static, readonly) IOSAllowedAppearanceModes :string

The IOSAllowedAppearanceModes options.
Type:
  • string
Properties:
Name Type Description
DEFAULT string Normal application appearance and page rendering, as configured by the host app.
SEPIA string Renders the PDF content with a sepia tone.
NIGHT string Inverts the PDF page content and applies color correction.
ALL string All options.
Source:

(static, readonly) IOSAllowedMenuActions :string

The IOSAllowedMenuActions options.
Type:
  • string
Properties:
Name Type Description
NONE string Allow no action.
SEARCH string Allow searching the document with selected text.
DEFINE string Allow presenting the definition for selected text.
WIKIPEDIA string Allow searching Wikipedia with selected text.
SPEAK string Allow accessibility text-to-speech.
ALL string Allow all actions.
Source:

(static, readonly) IOSBookmarkSortOrder :string

The IOSBookmarkSortOrder options.
Type:
  • string
Properties:
Name Type Description
CUSTOM string Custom sort order, based on creation, but reorderable.
PAGE_BASED string Sort based on pages.
Source:

(static, readonly) IOSDoubleTapAction :string

The IOSDoubleTapAction options.
Type:
  • string
Properties:
Name Type Description
NONE string Do not zoom on double tap.
ZOOM string Zoom on double tap.
SMART_ZOOM string Smart zoom on double tap.
Source:

(static, readonly) IOSDrawCreateMode :string

The IOSDrawCreateMode options.
Type:
  • string
Properties:
Name Type Description
SEPARATE string Every stroke will result in a separate ink annotation.
MERGE_IF_POSSIBLE string Strokes that have the same color/width are merged.
Source:

(static, readonly) IOSLinkAction :string

The IOSLinkAction options.
Type:
  • string
Properties:
Name Type Description
AUTOMATIC string Link actions are ignored.
ALERT_VIEW string Link actions open an UIAlertView.
OPEN_SAFARI string Link actions directly open Safari or whichever app is set as the default browser.
INLINE_BROWSER string Link actions open in an SFSafariViewController, falling back on PDFWebViewController for local file URLs.
INLINE_WEB_VIEW_CONTROLLER string Always uses PDFWebViewController.
Source:

(static, readonly) IOSRenderStatusViewPosition :string

The IOSRenderStatusViewPosition options.
Type:
  • string
Properties:
Name Type Description
TOP string Display render status view at the top.
CENTERED string Display render status view at the center.
Source:

(static, readonly) IOSScrubberBarType :string

The IOSScrubberBarType options.
Type:
  • string
Properties:
Name Type Description
HORIZONTAL string The default style: A scrubber bar that lays out its thumbnails along its width.
VERTICAL_LEFT string Style for a scrubber bar that lays out its thumbnails along its height and sits along the left edge of its container.
VERTICAL_RIGHT string Style for a scrubber bar that lays out its thumbnails along its height and sits along the right edge of its container view.
Source:

(static, readonly) IOSSearchMode :string

The IOSSearchMode options.
Type:
  • string
Properties:
Name Type Description
MODAL string Display search results in a modal view.
INLINE string Display search results inline.
Source:

(static, readonly) IOSSettingsOptions :string

The IOSSettingsOptions options.
Type:
  • string
Properties:
Name Type Description
SCROLL_DIRECTION string Shows UI to change ScrollDirection.
PAGE_TRANSITION string Shows UI to change PageTransition (continuous or per-spread scrolling).
APPEARANCE string Shows UI to change AppearanceMode (sepia and dark rendering).
BRIGHTNESS string Shows UI to adjust screen brightness.
PAGE_MODE string Shows UI to change PageMode (single or double page mode).
DEFAULT string The default set of settings the user can adjust with PDFSettingsViewController.
ALL string All the settings that can be set by a PDFSettingsViewController.
Source:

(static, readonly) IOSTextSelectionMode :string

The IOSTextSelectionMode options.
Type:
  • string
Properties:
Name Type Description
REGULAR string Selecting text in regular mode starts after a long-press and results in a selection with dragging handles.
SIMPLE string Selecting text in simple mode starts almost immediately on touch down and results in a selection with dragging handles.
AUTOMATIC string Selection mode will be chosen based on input device: selecting text with finger or Apple Pencil will use regular mode, while selecting text with trackpad or mouse will use simple mode.
Source:

(static, readonly) IOSThumbnailGrouping :string

The IOSThumbnailGrouping options.
Type:
  • string
Properties:
Name Type Description
AUTOMATIC string Group double pages when PageMode.double is enabled.
NEVER string Never group double pages for thumbnails.
ALWAYS string Always group double pages for thumbnails.
Source:

(static, readonly) IOSTypesShowingColorPresets :string

The IOSTypesShowingColorPresets options.
Type:
  • string
Properties:
Name Type Description
NONE string
UNDEFINED string
ALL string
LINK string
HIGHLIGHT string
UNDERLINE string
SQUIGGLY string
STRIKE_OUT string
TEXT string
CARET string
FREE_TEXT string
INK string
SQUARE string
CIRCLE string
LINE string
SIGNATURE string
STAMP string
ERASER string
IMAGE string
WIDGET string
FILE_ATTACHMENT string
SOUND string
POLYGON string
POLY_LINE string
RICH_MEDIA string
SCREEN string
POPUP string
WATERMARK string
TRAP_NET string
3D string
REDACT string
Source:

(static, readonly) PageMode :string

The PageMode options.
Type:
  • string
Properties:
Name Type Description
SINGLE string Always show a single page.
DOUBLE string Always show two pages side-by-side.
AUTOMATIC string Show two pages only when the view is sufficiently large and two pages can be shown without too much shrinking.
Source:

(static, readonly) PageTransition :string

Configures the page scrolling mode. Note that curl mode is only available for iOS and will be ignored on Android.
Type:
  • string
Properties:
Name Type Description
SCROLL_PER_SPREAD string Transitions from one spread to another and does not stop scrolling in between two spreads (paginated).
SCROLL_CONTINUOUS string Scrolls continuously.
CURL string Page curl mode, similar to Apple Books. Not supported with variable sized PDFs. Only available on iOS.
Source:

(static, readonly) ScrollDirection :string

Configures the direction of page scrolling in the document view.
Type:
  • string
Properties:
Name Type Description
HORIZONTAL string Enable horizontal scrolling.
VERTICAL string Enable vertical scrolling.
Source:

(static, readonly) ShowThumbnailBar :string

The ShowThumbnailBar options.
Type:
  • string
Properties:
Name Type Description
NONE string Don't show any thumbnails.
DEFAULT string The default thumbnail bar (like Apple Books, ScrubberBar)
FLOATING string Show a floating scrubber bar (ScrubberBar)
PINNED string Show a pinned scrubber bar (ScrubberBar)
SCRUBBER_BAR string Show scrubber bar (like Apple Books, ScrubberBar)
SCROLLABLE string Show scrollable thumbnail bar (ThumbnailBar)
Source:

(static, readonly) SignatureSavingStrategy :string

The SignatureSavingStrategy options.
Type:
  • string
Properties:
Name Type Description
ALWAYS_SAVE string Always save the signature after it is created.
NEVER_SAVE string Never save the signature after it is created.
SAVE_IF_SELECTED string Save the signature after it is created, if indicated by the user.
Source:

(static, readonly) SpreadFitting :string

The SpreadFitting options.
Type:
  • string
Properties:
Name Type Description
FIT string Aspect fit results in a spread view having all its pages always visible on screen.
FILL string Aspect fills the content so that it completely covers the width of the view.
ADAPTIVE string Automatically switches between fit and fill.
Source:

(static, readonly) UserInterfaceViewMode :string

The UserInterfaceViewMode options.
Type:
  • string
Properties:
Name Type Description
AUTOMATIC string Show user interface view on touch and first/last page.
AUTOMATIC_BORDER_PAGES string Show user interface view on touch and first/last page.
AUTOMATIC_NO_FIRST_LAST_PAGE string Show user interface view on touch.
ALWAYS string Always show the user interface view.
ALWAYS_VISIBLE string Always show the user interface view.
ALWAYS_HIDDEN string Never show the user interface view.
NEVER string Never show the user interface view.
Source:

Type Definitions

RemoteDocumentConfiguration

The configuration when downloading a document from a remote URL.
Properties:
Name Type Attributes Description
outputFilePath string <optional>
The location where the downloaded document should be stored. If not set, the document will be stored in a temporary cache directory.
overwriteExisting boolean <optional>
Whether the document should be overwritten if it already exists at the specified location.
Source: