Builder
Builder used to construct PdfActivityConfiguration instance.
Constructors
Creates a new com.pspdfkit.ui.PdfActivity configuration builder.
Create a new builder from existing configuration.
Functions
Sets whether multiple bookmarks per page can be added or not. If disabled only one bookmark will be allowed per page. Defaults to false
allowing only one bookmark per page.
Sets whether page changes triggered by tapping the page edge cause an animation. Defaults to false
making the transition instant.
Enable/disable annotation editing functionality.
Enable/disable the list of annotations.
Sets whether reordering annotations in the annotation list is enabled. This defaults to true
.
Sets whether the annotation popup toolbar is enabled or not. If disabled, we don't show the popup toolbar when you long press a selected annotation.
Configures which part of the annotation replies UI is enabled. If AnnotationReplyFeatures.ENABLED, the replies can be added to note annotations and annotation notes. If AnnotationReplyFeatures.READ_ONLY, the replies can be looked at but none can be added or modified. If AnnotationReplyFeatures.DISABLED, the reply UI is disabled entirely. This feature is only UI specific, defining the replies availability in the com.pspdfkit.ui.PdfFragment's UI. The API for retrieving and adding replies still works even if this property is AnnotationReplyFeatures.DISABLED.
Enable/disable annotation rotation functionality.
Enables or disables automatic link generation. If true
we will automatically parse the text and generate clickable links for all URLs and eMail addresses in the document text.
Enables or disables autosaving of modified PDF documents. This is enabled by default.
Sets color of PDF background. Color#WHITE
by default.
Enable/disable editing controls on the bookmarks list.
Enable/disable the display of bookmarks.
Generates the PdfActivityConfiguration instance.
Replaces all properties from the PdfConfiguration
Enable/disable content editing functionality.
Enable/disable copy and paste of annotations.
Enable/disable default toolbar.
Disables annotation editing functionality.
Disables the page bounds limit imposed when dragging annotations. By default this is enabled. Note: this is an experimental feature - we cannot guarantee flawless behaviour or that it won't change in future.
Disables the list of annotations.
Disables annotation rotation functionality.
Disabled editing controls on the bookmarks list.
Disables the display of bookmarks.
Disables content editing functionality.
Disables copy and paste of annotations.
Disables default toolbar.
Disables document editing functionality in the page grid.
Disables the document info view.
Disables the embedded files menu in the activity.
Disables form editing functionality.
Disables outline menu in the activity.
Hides printing option in the sharing menu even if printing can be done on the device.
Disables document search functionality.
Enable/disable document editing functionality in the page grid.
Enable/disable document info view.
Show/hide document title.
Sets a list of annotation types that can be selected on page and edited.
Enables the embedded files menu in the activity.
Enables annotation editing functionality.
Enables the list of annotations.
Enables annotation rotation functionality.
Enables editing controls on the bookmarks list.
Enables the display of bookmarks.
Enables content editing functionality.
Enables copy and paste of annotations.
Sets a list of annotation tools that are enabled.
Enables default toolbar.
Enables document editing functionality in the page grid.
Enables the document info view.
Enables the embedded files menu in the activity.
Enables form editing functionality.
Sets whether the magnifier is shown when text selection handles are touched. Defaults to true
.
Enables outline menu in the activity.
Enables printing option in the menu if applicable for the document and the device.
Sets whether we enable the reader view in the activity or not. It includes also the icon in the main toolbar. It requires the Reader View license to work. Defaults to false
.
Enables document search functionality.
Sets a list of annotation types that will be excluded from rendering.
Sets whether the first page should always be displayed as a single or not. This is notable only if double page mode is active.
Sets the page fit mode. Valid modes are PageFitMode.FIT_TO_SCREEN which will try to fit pages into the device's screen, or PageFitMode.FIT_TO_WIDTH which will fit the page so that it's width matches the device's screen width.
Forces the signature button to show up in the main toolbar. The button's visibility in the main toolbar default to false
when the license uses Annotation Editing, as normally the annotation signature creation can be accessed via the Annotation Creation Toolbar. For the special case where the license includes Electronic Signatures without Annotation Editing, the signature button will be included in the main toolbar rather than in the Annotation Creation Toolbar. Throws when license does not support using Electronic Signatures.
Enable/disable form editing functionality.
Hides the overlay displaying the document title.
Hides the navigation buttons.
Hides page labels (if any).
Hides the overlay displaying currently selected page.
Hides the settings menu icon.
Hides the actionbar icon to show grid of thumbnail pages.
Sets to automatically hide user interface controls when annotation creation toolbar position is in vertical position (left/right). Changing toolbar's position to top restores user interface visibility. This options is valid only for UserInterfaceViewMode.USER_INTERFACE_VIEW_MODE_AUTOMATIC and UserInterfaceViewMode.USER_INTERFACE_VIEW_MODE_AUTOMATIC_BORDER_PAGES.
Sets if the colors will be inverted in the document. This is disabled by default.
Sets a layoutRes
used by the launched activity. When using this, make sure that the selected layout contains all the required views. This defaults to R.layout.pspdf__pdf_activity.
Sets the page layout mode, or how the document will layout the pages (as single pages, double pages or automatically).
Sets the annotation types that should be displayed in the annotation list. By default, all types are displayed except AnnotationType.LINK.
Sets a drawable for loading progress throbber while document is loaded.
Sets the maximum zoom scale at which the document should be displayed. Make sure this value is higher than defaultZoomScale. Defaults to com.pspdfkit.ui.PdfFragment.MAX_ZOOM.
Sets size of memory cache for rendered pages and bitmaps. Defaults to 1/4 of available heap size of the app.
Show/hide the navigation buttons.
Enable/disable outline menu in the activity.
Sets the page to start the document at. Default value is 0
.
Show/hide page labels (if any).
Show/hide the overlay displaying currently selected page.
Sets the padding between pages. Defaults to 16dp.
Enable/disable printing option in the menu if applicable for the document and the device.
Enables or disables redo support. If true
we will allow the user to redo changes that were undone before. If false
the user will not be able to redo edits. If undo is disabled setting this to true
will not do anything.
Enables or disables restoration of the last viewed page when reopening a document. If true
, the last viewed page will be restored when opening the document a second time. If false
, the document will be opened at page index 0
. Defaults to true
.
Sets the document scrollbars to be enabled or disabled.
Sets the scrolling direction (i.e. the orientation
) for the document. This defaults to PageScrollDirection.HORIZONTAL.
Sets the scrolling mode. Currently supported scrolling modes are PageScrollMode.PER_PAGE (also called paginated scroll mode) which will snap in pages, and PageScrollMode.CONTINUOUS which will not snap in to pages, but allow to scroll continuously.
Sets whether taps on the edge of a page scroll to the next / previous page. Defaults to true
enabling scrolling by tapping the edge of pages.
Margin in dp in which taps on the edge of the page will trigger the page navigation. Defaults to 24dp
.
Sets configuration used for searching, applied to search views.
Enable/disable document search functionality.
Enables or disables resize guides. This defaults to true
.
Enables or disables font scaling. This defaults to true
.
Sets whether the annotation inspector is enabled. This defaults to true
.
Enables or disables visual indicator shown for annotations that have annotation notes.
The documeninfo view is now by default in a separate window and no longer in the outlineview. If you want to keep the old behaviour with the document info in the outline view, call this method with false
Sets the CopyPasteFeatures that are enabled. Defaults to all features being enabled.
Configures which share features are enabled in the UI. This feature is only UI specific, defining the available sharing features in the com.pspdfkit.ui.PdfActivity. The sharing API still works even if certain share feature is disabled.
Enables or disables handling for AnnotationFlags.NOZOOM flag for note annotations. Note annotations are always displayed as if AnnotationFlags.NOZOOM flag was set by default.
Enables or disables JavaScript processing. Defaults to true
.
Enables or disables measurement tools functionality.
Sets whether the multithreaded rendering should be enabled. Defaults to true
.
Sets whether outline elements are expanded or collapsed.
Sets whether we show the UI to apply redactions when there are com.pspdfkit.annotations.RedactionAnnotation in the document or not. Defaults to true
.
Sets guide line on/off intervals sizes. Must have an even number of entries (>=2). Even indices are specifying the "on" intervals, the odd indices specifying the "off" intervals. "On" intervals specify length of the line dashes, "Off" specify length of the line gaps.
Sets how aggressively the resize guides works.
Sets the search type (if search is enabled).
Enable or disable resizing of selected annotations. This defaults to true
.
Sets the items to show in the settings menu. By default all the items are shown. If none are shown the settings menu icon will not be shown either.
Sets the orientation to use for the signature picker. Defaults to SignaturePickerOrientation.AUTOMATIC.
Configures the tab bar hiding mode.
Sets the thumbnail bar mode.
Show/hide the settings menu icon.
Sets the user interface view mode.
Enables or disables volume buttons navigation. This is disabled by default.
Shows overlay displaying the document title.
Sets whether to show gao between pages in double page mode or not.
Shows the navigation buttons.
Sets whether the note editor should be started automatically for newly created note annotations. Defaults to true
.
Enables display of the page labels (if any).
Shows overlay displaying current page number over document.
Shows the settings menu icon.
Sets whether the sign here overlay is shown inside of signature form fields. Defaults to true
.
Displays an actionbar icon to show grid of thumbnail pages.
Defines the 3 signature color options available when using the Electronic Signatures "Draw" or "Type" signing UI. Defaults to black, purple, and blue.
The ways in which the user can choose to add their signature.
Signature saving strategy used within the dialog when adding signatures. Defaults to SignatureSavingStrategy.SAVE_IF_SELECTED. This will only work if a com.pspdfkit.signatures.storage.SignatureStorage has been created and set via com.pspdfkit.ui.PdfFragment.setSignatureStorage, otherwise SignatureSavingStrategy.NEVER_SAVE will be used.
Sets the start scale at which the document will be displayed. Defaults to com.pspdfkit.ui.PdfFragment.DEFAULT_ZOOM.
Indicates whether we should automatically detect the stylus. Enabling this will automatically disable all other inputs once we detect stylus use. Enabling this will also allow for swiping between pages with the finger during annotating and automatically turn on the "Use stylus for annotating" switch, if it is off. Disabling this setting allows for drawing with both the stylus and the finger but prevents swiping with the finger during annotating unless the "Use stylus for annotating" setting switch in the document has been manually turned on. Defaults to true
Enables or disables text selection (both programmatically and via long-press gesture). This is enabled by default.
Sets whether the text selection popup toolbar is enabled or not. If disabled, and this configuration is used within your com.pspdfkit.ui.PdfActivity, the old text selection toolbar will be used.
Sets a themeRes
used to override default activity theme.
Sets a themeDarkRes
used to override dark activity theme.
Sets the app theme mode. Night mode automatically inverts colors.
Show/hide the actionbar icon to show grid of thumbnail pages.
Sets the actionbar activity title. If not set (or null
), PSPDFKit will extract the title from the loaded PDF document.
Sets if the colors will be converted to grayscale. This is disabled by default.
Enables or disables undo support. If true
we will keep track of edits to the document and allow the user to undo actions. If false
the user will not be able to undo edits and redo will also be disabled.
Enabled immersive fullscreen mode in the activity. Note that this feature is only natively supported from Android 4.4 and newer, before that a FullScreen theme will have to be applied to PSPDFKit activity. This defaults to false
.
Enables or disables video playback. This is disabled by default.
Should the zoom out below the minimum zoom have a bounce-back effect on a page.