public abstract class

PdfConfiguration

extends Object
implements Parcelable
java.lang.Object
   ↳ com.pspdfkit.configuration.PdfConfiguration

Class Overview

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

Summary

Nested Classes
class PdfConfiguration.Builder Builder used to construct PdfConfiguration instance. 
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
abstract AnnotationReplyFeatures getAnnotationReplyFeatures()
Which parts of the annotation replies UI are enabled.
abstract int getBackgroundColor()
Document paper color (white is default).
abstract List<AnnotationType> getEditableAnnotationTypes()
Returns a list of annotation types that should be editable.
abstract List<AnnotationTool> getEnabledAnnotationTools()
Returns a list of annotation tools that should be enabled.
abstract EnumSet<CopyPasteFeatures> getEnabledCopyPasteFeatures()
The enabled CopyPasteFeatures.
abstract EnumSet<ShareFeatures> getEnabledShareFeatures()
Indicates which supported share features are enabled in the UI.
abstract ArrayList<AnnotationType> getExcludedAnnotationTypes()
Returns a list of annotation types that will be excluded from rendering.
abstract PageFitMode getFitMode()
Fit mode of the document (fit-to-screen is default).
abstract Integer getFixedLowResRenderPixelCount()
Returns fixed low resolution render pixel count or null.
abstract List<Float> getGuideLineIntervals()
Defines guide line on/off intervals sizes.
abstract PageLayoutMode getLayoutMode()
Layout mode of the document (AUTO is default).
abstract Integer getLoadingProgressDrawable()
Returns drawable for the throbber displayed while loading the document.
abstract float getMaxZoomScale()
Maximum zoom scale in the document.
abstract int getMemoryCacheSize()
Size of the memory cache (defaults to 1/4 of the available heap size).
abstract int getPagePadding()
The padding between pages (defaults to 16dp).
abstract float getResizeGuideSnapAllowance()
Defines aggressiveness of snapping to guide lines.
abstract PageScrollDirection getScrollDirection()
Scroll direction of the document (horizontal is default).
abstract PageScrollMode getScrollMode()
Scroll mode of the document (per-page is default).
abstract boolean getSelectedAnnotationResizeEnabled()
Indicates whether the selected annotation resizing is enabled or not.
abstract boolean getSelectedAnnotationResizeGuidesEnabled()
Indicates whether the annotation selection resize guide lines are enabled or not.
abstract SignatureAppearance getSignatureAppearance()
Defines the appearance of the digital signature that is added after digitally signing a document.
abstract SignatureCertificateSelectionMode getSignatureCertificateSelectionMode()
Defines if the user should be able to select certificates for digitally signing a document, when creating a new signature.
abstract SignaturePickerOrientation getSignaturePickerOrientation()
The orientation to use for the signature picker, defaults to AUTOMATIC.
abstract SignatureSavingStrategy getSignatureSavingStrategy()
The saving strategy used when adding signatures.
abstract float getStartZoomScale()
The scale at which the document should start.
abstract ThemeMode getThemeMode()
Theme mode of the whole app (DEFAULT is default).
abstract boolean isAnnotationEditingEnabled()
Indicates whether the annotation editing is enabled or not.
abstract boolean isAnnotationInspectorEnabled()
Indicates whether the annotation creation and editing inspectors are enabled.
abstract boolean isAnnotationRotationEnabled()
Indicates whether the annotation rotation is enabled or not.
abstract boolean isAutoSelectNextFormElementEnabled()
Indicates whether the auto select next form element functionality is enabled or not (defaults to false).
abstract boolean isAutomaticLinkGenerationEnabled()
Whether we automatically generating link annotations for links in the document text is enabled or not.
abstract boolean isAutosaveEnabled()
Whether document autosave is enabled.
abstract boolean isCopyPasteEnabled()
Whether copy and paste operations are enabled for annotations.
abstract boolean isCustomerSignatureFeatureEnabled()
This method is deprecated. Use getSignatureSavingStrategy() to retrieve the signature saving strategy.
abstract boolean isEmbeddedFilesSharingEnabled()
This method is deprecated. Use getEnabledShareFeatures() and check if EMBEDDED_FILE_SHARING is enabled.
abstract boolean isFirstPageAlwaysSingle()
Whether the first page should always be displayed as a single or not, false by default.
abstract boolean isFormEditingEnabled()
Indicates whether the form editing is enabled or not.
abstract boolean isInvertColors()
If the page colors should be inverted (defaults to false).
abstract boolean isJavaScriptEnabled()
Controls whether JavaScript processing is enabled.
abstract boolean isLastViewedPageRestorationEnabled()
Whether restoration of the last viewed page when reopening a document is enabled or not.
abstract boolean isMultithreadedRenderingEnabled()
Controls whether multithreaded rendering is enabled, defaults to true.
abstract boolean isNoteAnnotationNoZoomHandlingEnabled()
Whether handling for NOZOOM flag for note annotations is enabled.
abstract boolean isPlayingMultipleMediaInstancesEnabled()
Whether playing multiple media instances is enabled or not.
abstract boolean isRedoEnabled()
Whether redoing undone edits is enabled.
abstract boolean isScrollbarsEnabled()
If the default document scrollbars should be enabled (defaults to true).
abstract boolean isSharingNoteEditorContentEnabled()
This method is deprecated. Use getEnabledShareFeatures() and check if NOTE_EDITOR_CONTENT_SHARING is enabled.
abstract boolean isSignatureSavingEnabled()
This method is deprecated. Use getSignatureSavingStrategy() to retrieve the signature saving strategy.
abstract boolean isTextSelectionEnabled()
If text selection (programmatically and via long-press) is enabled (defaults to true).
abstract boolean isTextSelectionPopupToolbarEnabled()
Whether the text selection popup toolbar is enabled or not.
abstract boolean isTextSharingEnabled()
This method is deprecated. Use getEnabledShareFeatures() and check if TEXT_SELECTION_SHARING is enabled.
abstract boolean isToGrayscale()
Should the page colors be converted to grayscale (defaults to false).
abstract boolean isUndoEnabled()
Whether undoing edits is enabled.
abstract boolean isVideoPlaybackEnabled()
Whether video playback is enabled in document.
abstract boolean shouldZoomOutBounce()
Should the zoom out below the minimum zoom have a bounce-back effect on a page.
abstract boolean showGapBetweenPages()
Whether to show gap between pages in double page mode or not.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Public Methods

public abstract AnnotationReplyFeatures getAnnotationReplyFeatures ()

Which parts of the annotation replies UI are enabled.

Returns

public abstract int getBackgroundColor ()

Document paper color (white is default).

Returns
  • Default paper color for the document.

public abstract List<AnnotationType> getEditableAnnotationTypes ()

Returns a list of annotation types that should be editable.

Returns
  • List of annotation types that should be editable. Note that empty list here means "All annotations are editable."

public abstract List<AnnotationTool> getEnabledAnnotationTools ()

Returns a list of annotation tools that should be enabled.

Returns
  • List of enabled annotation tools. Note that empty list here means that all annotation tools are enabled.

public abstract EnumSet<CopyPasteFeatures> getEnabledCopyPasteFeatures ()

The enabled CopyPasteFeatures. Defaults to all features being enabled.

public abstract EnumSet<ShareFeatures> getEnabledShareFeatures ()

Indicates which supported share features are enabled in the UI.

Returns

public abstract ArrayList<AnnotationType> getExcludedAnnotationTypes ()

Returns a list of annotation types that will be excluded from rendering.

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

public abstract PageFitMode getFitMode ()

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

Returns

public abstract Integer getFixedLowResRenderPixelCount ()

Returns fixed low resolution render pixel count or null.

Returns
  • fixed low resolution render pixel count.

public abstract List<Float> getGuideLineIntervals ()

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.

Returns
  • List of ON and OFF distances.

public abstract PageLayoutMode getLayoutMode ()

Layout mode of the document (AUTO is default).

Returns

public abstract Integer getLoadingProgressDrawable ()

Returns drawable for the throbber displayed while loading the document.

Returns
  • Drawable resource for the throbber displayed when loading a document.

public abstract float getMaxZoomScale ()

Maximum zoom scale in the document.

Returns
  • Maximum zoom scale at which the document can be zoomed.

public abstract int getMemoryCacheSize ()

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

Returns
  • Memory cache size.

public abstract int getPagePadding ()

The padding between pages (defaults to 16dp).

Returns
  • Padding between pages in dp.

public abstract float getResizeGuideSnapAllowance ()

Defines aggressiveness of snapping to guide lines.

Returns
  • How many pixels around guide will snap to guide when resizing. Defaults to 30f.

public abstract PageScrollDirection getScrollDirection ()

Scroll direction of the document (horizontal is default).

Returns

public abstract PageScrollMode getScrollMode ()

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

Returns

public abstract boolean getSelectedAnnotationResizeEnabled ()

Indicates whether the selected annotation resizing is enabled or not.

Returns
  • true if resizing of selected annotations is enabled, otherwise false.

public abstract boolean getSelectedAnnotationResizeGuidesEnabled ()

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

Returns
  • true if resize guide lines are enabled, otherwise false

public abstract SignatureAppearance getSignatureAppearance ()

Defines the appearance of the digital signature that is added after digitally signing a document. The signature appearance to use or null to use the default appearance.

public abstract SignatureCertificateSelectionMode getSignatureCertificateSelectionMode ()

Defines if the user should be able to select certificates for digitally signing a document, when creating a new signature.

public abstract SignaturePickerOrientation getSignaturePickerOrientation ()

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

Returns
  • Orientation to use for the signature picker.

public abstract SignatureSavingStrategy getSignatureSavingStrategy ()

The saving strategy used when adding signatures.

Returns
  • The currently used signature saving strategy.

public abstract float getStartZoomScale ()

The scale at which the document should start.

Returns
  • Initial zoom scale of the document.

public abstract ThemeMode getThemeMode ()

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

Returns

public abstract boolean isAnnotationEditingEnabled ()

Indicates whether the annotation editing is enabled or not.

Returns
  • true if annotation editing functionality should be enabled.

public abstract boolean isAnnotationInspectorEnabled ()

Indicates whether the annotation creation and editing inspectors are enabled.

Returns
  • true when annotation property inspector is enabled.

public abstract boolean isAnnotationRotationEnabled ()

Indicates whether the annotation rotation is enabled or not.

Returns
  • true if annotation rotation functionality should be enabled.

public abstract boolean isAutoSelectNextFormElementEnabled ()

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

Returns
  • true if auto select next form element functionality should be enabled.

public abstract boolean isAutomaticLinkGenerationEnabled ()

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.

public abstract boolean isAutosaveEnabled ()

Whether document autosave is enabled.

Returns
  • true if autosave is enabled, false otherwise.

public abstract boolean isCopyPasteEnabled ()

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.

Returns
  • true if copy/paste is enabled, false otherwise.

public abstract boolean isCustomerSignatureFeatureEnabled ()

This method is deprecated.
Use getSignatureSavingStrategy() to retrieve the signature saving strategy.

Whether Customer Signature feature is enabled when adding a signature to the page.

Returns
  • true if customer signature feature is enabled, false otherwise

public abstract boolean isEmbeddedFilesSharingEnabled ()

This method is deprecated.
Use getEnabledShareFeatures() and check if EMBEDDED_FILE_SHARING is enabled.

Indicates whether embedded files sharing is enabled (defaults to true).

Returns
  • true if embedded files sharing is enabled, false otherwise.

public abstract boolean isFirstPageAlwaysSingle ()

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

Returns
  • true to always display the first page as a single (standalone) even in double page mode, false otherwise.

public abstract boolean isFormEditingEnabled ()

Indicates whether the form editing is enabled or not.

Returns
  • true if form editing functionality should be enabled.

public abstract boolean isInvertColors ()

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

Returns
  • true is page color will be inverted, false otherwise.

public abstract boolean isJavaScriptEnabled ()

Controls whether JavaScript processing is enabled. Defaults to true.

Note: Processing JavaScript can be slow for documents with a large number of document providers or scripts. Disabling in most cases will not have any negative effects.

Returns
  • true if JavaScript is processing is enabled.

public abstract boolean isLastViewedPageRestorationEnabled ()

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.

public abstract boolean isMultithreadedRenderingEnabled ()

Controls whether multithreaded rendering is enabled, defaults to true.

Returns
  • true when multithreaded rendering is enabled, false otherwise.

public abstract boolean isNoteAnnotationNoZoomHandlingEnabled ()

Whether handling for NOZOOM flag for note annotations is enabled.

Note: Note annotations are always displayed as if NOZOOM flag was set by default - i.e. they won't scale with page.

Returns
  • true if note annotations should respect missing NOZOOM flag and should scale with page when it's not set. false to prevent note annotations scaling with page.

public abstract boolean isPlayingMultipleMediaInstancesEnabled ()

Whether playing multiple media instances is enabled or not.

Returns
  • true to enable multiple media instances, false to always use a single one.

public abstract boolean isRedoEnabled ()

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

Returns
  • true if redo is enabled, false otherwise.

public abstract boolean isScrollbarsEnabled ()

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

Returns
  • true if the scrollbars are enabled, otherwise false.

public abstract boolean isSharingNoteEditorContentEnabled ()

This method is deprecated.
Use getEnabledShareFeatures() and check if NOTE_EDITOR_CONTENT_SHARING is enabled.

Whether the sharing of note editor content (annotation main content and replies) is enabled or not in the note editor UI.

Returns
  • true to enable, false to disable

public abstract boolean isSignatureSavingEnabled ()

This method is deprecated.
Use getSignatureSavingStrategy() to retrieve the signature saving strategy.

Whether the PSPDFKit will differentiate between My Signature / Customer Signature.

Returns
  • true if My Signature option would be present, false if it equals Customer Signature

public abstract boolean isTextSelectionEnabled ()

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

Returns
  • true if text selection on the document is enabled, false otherwise.

public abstract boolean isTextSelectionPopupToolbarEnabled ()

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

Returns
  • true is text selection popup toolbar is enabled, false otherwise.

public abstract boolean isTextSharingEnabled ()

This method is deprecated.
Use getEnabledShareFeatures() and check if TEXT_SELECTION_SHARING is enabled.

If text sharing (from selection and from annotations contents) is enabled (defaults to true).

Returns
  • true if text sharing is enabled, false otherwise.

public abstract boolean isToGrayscale ()

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

Returns
  • true is page color will be converted to grayscale, false otherwise.

public abstract boolean isUndoEnabled ()

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

Returns
  • true if undo is enabled, false otherwise.

public abstract boolean isVideoPlaybackEnabled ()

Whether video playback is enabled in document.

Returns
  • true if video playback is enabled false otherwise (defaults to false).

public abstract boolean shouldZoomOutBounce ()

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

Returns
  • true if the document should bounce when zooming out below the minimum zoom, false otherwise.

public abstract boolean showGapBetweenPages ()

Whether to show gap between pages in double page mode or not. Defaults to false.

Returns
  • true to show the gap between pages, false to join them together.