PdfConfiguration

data class PdfConfiguration(val scrollDirection: PageScrollDirection, val scrollMode: PageScrollMode, val fitMode: PageFitMode, val layoutMode: PageLayoutMode, val themeMode: ThemeMode, val isFirstPageAlwaysSingle: Boolean, val showGapBetweenPages: Boolean, val isScrollbarsEnabled: Boolean, val backgroundColor: Int, val loadingProgressDrawable: Int?, val memoryCacheSize: Int, val isInvertColors: Boolean, val isToGrayscale: Boolean, val startZoomScale: Float, val maxZoomScale: Float, val shouldZoomOutBounce: Boolean, val isTextSelectionEnabled: Boolean, val isFormEditingEnabled: Boolean, val isAutoSelectNextFormElementEnabled: Boolean, val isFormElementDateAndTimePickerEnabled: Boolean, val isAnnotationEditingEnabled: Boolean, val isAnnotationRotationEnabled: Boolean, val isContentEditingEnabled: Boolean, val isMeasurementsEnabled: Boolean, val isAnnotationLimitedToPageBounds: Boolean, val useRectangleSelectionForMarkupAnnotations: Boolean, val editableAnnotationTypes: List<AnnotationType>, val enabledAnnotationTools: List<AnnotationTool>, val selectedAnnotationResizeEnabled: Boolean, val selectedAnnotationResizeGuidesEnabled: Boolean, val selectedAnnotationFontScalingOnResizeEnabled: Boolean, val resizeGuideSnapAllowance: Float, val guideLineIntervals: List<Float>, val isAnnotationInspectorEnabled: Boolean, val excludedAnnotationTypes: List<AnnotationType>, val isAutosaveEnabled: Boolean, val pagePadding: Int, val isVideoPlaybackEnabled: Boolean, val isPlayingMultipleMediaInstancesEnabled: Boolean, val isLastViewedPageRestorationEnabled: Boolean, val isAutomaticLinkGenerationEnabled: Boolean, val isCopyPasteEnabled: Boolean, val enabledCopyPasteFeatures: EnumSet<CopyPasteFeatures>, val isUndoEnabled: Boolean, val isRedoEnabled: Boolean, val annotationReplyFeatures: AnnotationReplyFeatures, val fixedLowResRenderPixelCount: Int?, val isMultithreadedRenderingEnabled: Boolean, val signaturePickerOrientation: SignaturePickerOrientation, val signatureSavingStrategy: SignatureSavingStrategy, val signatureColorOptions: SignatureColorOptions, val signatureCreationModes: List<SignatureCreationMode>, val isNoteAnnotationNoZoomHandlingEnabled: Boolean, val isJavaScriptEnabled: Boolean, val isTextSelectionPopupToolbarEnabled: Boolean, val isAnnotationPopupToolbarEnabled: Boolean, val enabledShareFeatures: EnumSet<ShareFeatures>, val allowMultipleBookmarksPerPage: Boolean, val scrollOnEdgeTapEnabled: Boolean, val animateScrollOnEdgeTaps: Boolean, val scrollOnEdgeTapMargin: Int, val isMagnifierEnabled: Boolean, val showSignHereOverlay: Boolean, val showNoteEditorForNewNoteAnnotations: Boolean, val enableStylusOnDetection: Boolean, val outlineElementState: OutlineElementState) : Parcelable

Configuration for the core of PSPDFKit rendering engine. To create the configuration use the Builder.

Constructors

Link copied to clipboard
constructor(scrollDirection: PageScrollDirection, scrollMode: PageScrollMode, fitMode: PageFitMode, layoutMode: PageLayoutMode, themeMode: ThemeMode, isFirstPageAlwaysSingle: Boolean, showGapBetweenPages: Boolean, isScrollbarsEnabled: Boolean, backgroundColor: Int, loadingProgressDrawable: Int?, memoryCacheSize: Int, isInvertColors: Boolean, isToGrayscale: Boolean, startZoomScale: Float, maxZoomScale: Float, shouldZoomOutBounce: Boolean, isTextSelectionEnabled: Boolean, isFormEditingEnabled: Boolean, isAutoSelectNextFormElementEnabled: Boolean, isFormElementDateAndTimePickerEnabled: Boolean, isAnnotationEditingEnabled: Boolean, isAnnotationRotationEnabled: Boolean, isContentEditingEnabled: Boolean, isMeasurementsEnabled: Boolean, isAnnotationLimitedToPageBounds: Boolean, useRectangleSelectionForMarkupAnnotations: Boolean, editableAnnotationTypes: List<AnnotationType>, enabledAnnotationTools: List<AnnotationTool>, selectedAnnotationResizeEnabled: Boolean, selectedAnnotationResizeGuidesEnabled: Boolean, selectedAnnotationFontScalingOnResizeEnabled: Boolean, resizeGuideSnapAllowance: Float, guideLineIntervals: List<Float>, isAnnotationInspectorEnabled: Boolean, excludedAnnotationTypes: List<AnnotationType>, isAutosaveEnabled: Boolean, pagePadding: Int, isVideoPlaybackEnabled: Boolean, isPlayingMultipleMediaInstancesEnabled: Boolean, isLastViewedPageRestorationEnabled: Boolean, isAutomaticLinkGenerationEnabled: Boolean, isCopyPasteEnabled: Boolean, enabledCopyPasteFeatures: EnumSet<CopyPasteFeatures>, isUndoEnabled: Boolean, isRedoEnabled: Boolean, annotationReplyFeatures: AnnotationReplyFeatures, fixedLowResRenderPixelCount: Int?, isMultithreadedRenderingEnabled: Boolean, signaturePickerOrientation: SignaturePickerOrientation, signatureSavingStrategy: SignatureSavingStrategy, signatureColorOptions: SignatureColorOptions, signatureCreationModes: List<SignatureCreationMode>, isNoteAnnotationNoZoomHandlingEnabled: Boolean, isJavaScriptEnabled: Boolean, isTextSelectionPopupToolbarEnabled: Boolean, isAnnotationPopupToolbarEnabled: Boolean, enabledShareFeatures: EnumSet<ShareFeatures>, allowMultipleBookmarksPerPage: Boolean, scrollOnEdgeTapEnabled: Boolean, animateScrollOnEdgeTaps: Boolean, scrollOnEdgeTapMargin: Int, isMagnifierEnabled: Boolean, showSignHereOverlay: Boolean, showNoteEditorForNewNoteAnnotations: Boolean, enableStylusOnDetection: Boolean, outlineElementState: OutlineElementState)

Types

Link copied to clipboard
class Builder

Builder used to construct PdfConfiguration instance.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Indicates whether multiple bookmarks per page can be added or not, defaults to false. If disabled only one bookmark will be allowed to be added per page, otherwise multiple bookmarks can be added.

Link copied to clipboard

Indicates whether page changes triggered by tapping the page edge cause an animation. Defaults to false disabling page change animations when changing the page by tapping the page edge.

Link copied to clipboard

Which parts of the annotation replies UI are enabled. See AnnotationReplyFeatures.

Link copied to clipboard

Document paper color (white is default).

Link copied to clipboard

Returns a list of annotation types that should be editable. Empty list here means "All annotations are editable."

Link copied to clipboard

Returns a list of annotation tools that should be enabled. Note that empty list here means that all annotation tools are enabled.

Link copied to clipboard

The enabled CopyPasteFeatures. Defaults to all features being enabled.

Link copied to clipboard

Indicates which supported share features are enabled in the UI.

Link copied to clipboard

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

Link copied to clipboard

Returns a list of annotation types that will be excluded from rendering. Empty list means "All annotations are rendered."

Link copied to clipboard

Fit mode of the document (fit-to-screen is default).

Link copied to clipboard

Returns fixed low resolution render pixel count or null.

Link copied to clipboard
@get:Size(min = 2, multiple = 2)
val guideLineIntervals: List<Float>

Defines 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.

Link copied to clipboard

Indicates whether the annotation editing is enabled or not.

Link copied to clipboard

Indicates whether the annotation creation and editing inspectors are enabled.

Link copied to clipboard

Indicates whether the annotations are limited to the page bounds.

Link copied to clipboard

Whether the annotation popup toolbar is enabled or not. This appears when you long press a selected annotation

Link copied to clipboard

Indicates whether the annotation rotation is enabled or not.

Link copied to clipboard

Whether we automatically generating link annotations for links in the document text is enabled or not. If true we will automatically parse the text and generate clickable links for all URLs and eMail addresses in the document text. Defaults to false.

Link copied to clipboard

Whether document autosave is enabled.

Link copied to clipboard

Indicates whether the auto select next form element functionality is enabled or not (defaults to false).

Link copied to clipboard

Indicates whether the content editing is enabled or not.

Link copied to clipboard

Whether copy and paste operations are enabled for annotations. If true we will show copy and cut actions in the editing annotation toolbar. Defaults to true.

Link copied to clipboard

Whether the first page should always be displayed as a single or not, false by default.

Link copied to clipboard

Indicates whether the form editing is enabled or not.

Link copied to clipboard

Indicates whether the date and time pickers should be enabled for according form elements (defaults to true)

Link copied to clipboard

If the page colors should be inverted (defaults to false).

Link copied to clipboard

Controls whether JavaScript processing is enabled. Defaults to true.

Link copied to clipboard

Whether restoration of the last viewed page when reopening a document is enabled or not. 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.

Link copied to clipboard

Indicates whether the magnifier is shown when:

Link copied to clipboard

Indicates whether the measurement tools are enabled or not.

Link copied to clipboard

Controls whether multithreaded rendering is enabled, defaults to true.

Link copied to clipboard

Whether handling for AnnotationFlags.NOZOOM flag for note annotations is enabled.

Link copied to clipboard

Whether playing multiple media instances is enabled or not.

Link copied to clipboard

Whether redoing undone edits is enabled. If true we will show redo actions in the toolbar. Defaults to true,

Link copied to clipboard

If the default document scrollbars should be enabled (defaults to true).

Link copied to clipboard

If text selection (programmatically and via long-press) is enabled (defaults to true).

Link copied to clipboard

Whether the text selection popup toolbar is enabled or not. If disabled and used by some com.pspdfkit.ui.PdfActivity, the activity will fall back to using the old text selection toolbar.

Link copied to clipboard

Should the page colors be converted to grayscale (defaults to false).

Link copied to clipboard

Whether undoing edits is enabled. If true we will show undo actions in the toolbar. Defaults to true.

Link copied to clipboard

Whether video playback is enabled in document. (defaults to false).

Link copied to clipboard

Layout mode of the document (PageLayoutMode.AUTO is default).

Link copied to clipboard

Returns drawable resource for the throbber displayed while loading the document.

Link copied to clipboard

Maximum zoom scale in the document.

Link copied to clipboard

Size of the memory cache (defaults to 1/4 of the available heap size).

Link copied to clipboard

Indicates whether the outline elements expanded or collapsed.

Link copied to clipboard

The padding between pages (defaults to 16dp).

Link copied to clipboard

Defines aggressiveness of snapping to guide lines. How many pixels around guide will snap to guide when resizing. Defaults to 30f.

Link copied to clipboard

Scroll direction of the document (horizontal is default).

Link copied to clipboard

Scroll mode of the document (per-page is default).

Link copied to clipboard

Indicates whether tapping on the page edge causes the page to scroll. Defaults to true enabling navigating the document by tapping the page edges.

Link copied to clipboard

The margin in DP in which taps on the page edge trigger page navigation. Defaults to 24dp.

Indicates whether the font scaling when resizing Freetext annotations with the bottom right handle is enabled. Defaults to true.

Link copied to clipboard

Indicates whether the selected annotation resizing is enabled or not.

Link copied to clipboard

Indicates whether the annotation selection resize guide lines are enabled or not. Defaults to true.

Link copied to clipboard

Should the zoom out below the minimum zoom have a bounce-back effect on a page.

Link copied to clipboard

Whether to show gap between pages in double page mode or not. Defaults to false (join pages together).

Link copied to clipboard

Indicates whether the NoteEditor should be shown automatically when creating new note. Defaults to true.

Link copied to clipboard

Indicates whether the sign here overlay is shown on signature form fields. Defaults to true.

Link copied to clipboard

Defines the signature color options available when using the "Draw" or "Type" signing UI. Defaults to black, purple, and blue.

Link copied to clipboard

The ways in which the user can choose to add their signature.

Link copied to clipboard

The orientation to use for the signature picker, defaults to SignaturePickerOrientation.AUTOMATIC.

Link copied to clipboard

The saving strategy used when adding signatures. When the Electronic Signature component is available, saving defaults to SignatureSavingStrategy.NEVER_SAVE. Meanwhile, if the license used is still on legacy signatures, the property will default to SignatureSavingStrategy.SAVE_IF_SELECTED.

Link copied to clipboard

The scale at which the document should start.

Link copied to clipboard

Theme mode of the whole app (ThemeMode.DEFAULT is default).

Indicates whether the annotations are limited to the page bounds.