Namespace: Options

PSPDFKit.Options

Custom values for default options. These values will be frozen the first time PSPDFKit.load is called, and won't be modifiable after that.

Example

Set minimum ink annotation size.

PSPDFKit.Options.MIN_INK_ANNOTATION_SIZE = 64;
PSPDFKit.load();

Members

Type Definitions




Members

ENABLE_INK_SMOOTH_LINES: boolean

Enable smooth lines for ink annotations.

Type:
  • boolean
Default Value:
  • true

IGNORE_DOCUMENT_PERMISSIONS: boolean

Enables all the features by ignoring the document permissions.

Type:
  • boolean
Default Value:
  • false

INITIAL_DESKTOP_SIDEBAR_WIDTH: number

The default width of the sidebar on desktop browsers.

Type:
  • number
Default Value:
  • 300

INK_EPSILON_RANGE_OPTIMIZATION: number

Minimum range between two points for an ink annotation, in pixels.

Type:
  • number
Default Value:
  • 0

MIN_IMAGE_ANNOTATION_SIZE: number

Minimum size of image annotations, in pixels.

Type:
  • number
Default Value:
  • 5

MIN_INK_ANNOTATION_SIZE: number

Minimum size of ink annotations, in pixels.

Type:
  • number
Default Value:
  • 128

MIN_SHAPE_ANNOTATION_SIZE: number

Minimum size of shape annotations, in pixels.

Type:
  • number
Default Value:
  • 128

MIN_STAMP_ANNOTATION_SIZE: number

Minimum size of stamp annotations, in pixels.

Type:
  • number
Default Value:
  • 10

MIN_TEXT_ANNOTATION_SIZE: number

Minimum size of text annotations, in pixels.

Type:
  • number
Default Value:
  • 5

Defines the radius of the resize anchors in px.

Type:

Defines the padding between the annotation and the selection outline on px.

Type:

SELECTION_STROKE_WIDTH: number

Stroke width of the selection outline rectangle in px.

Type:
  • number
Default Value:
  • 2

SIGNATURE_SAVE_MODE: PSPDFKit.SignatureSaveMode

Saving strategy for ink signatures.

Type:
Default Value:
  • PSPDFKit.SignatureSaveMode.USING_UI

Type Definitions

ResizeAnchorRadiusCallback(viewportSize) → {number}

Receives a PSPDFKit.Geometry.Size object with the current viewport dimensions (width and height) and returns the radius of the selection resize / modification anchors in px.

The default implementation will increase the anchor radius on small device.

Parameters:
Name Type Description
viewportSize PSPDFKit.Geometry.Size
Returns:
Type
number

SelectionOutlinePaddingCallback(viewportSize) → {number}

Receives a PSPDFKit.Geometry.Size object with the current viewport dimensions (width and height) and returns the padding that will be added between an annotation and the selection outline in px.

The default implementation will increase the outline padding on small device.

Parameters:
Name Type Description
viewportSize PSPDFKit.Geometry.Size
Returns:
Type
number