Annotation

Members

(static, readonly) BlendMode :string

The available annotation blend modes
Type:
  • string
Properties:
Name Type Description
NORMAL string
MULTIPLY string
SCREEN string
OVERLAY string
DARKEN string
LIGHTEN string
COLOR_DODGE string
COLOR_BURN string
SOFT_LIGHT string
HARD_LIGHT string
DIFFERENCE string
EXCLUSION string
HUE string
SATURATION string
COLOR string
LUMINOSITY string
Source:

(static, readonly) BorderStyle :string

The available annotation border styles
Type:
  • string
Properties:
Name Type Description
SOLID string
DASHED_1_1 string
DASHED_1_3 string
DASHED_3_3 string
DASHED_6_6 string
BEVELED string
INSET string
UNDERLINE string
Source:

(static, readonly) Change :string

Specifies how a annotation should be included in the resulting document.
Type:
  • string
Properties:
Name Type Description
FLATTEN string The annotation will be flattened. It can no longer be modified in the resulting document.
REMOVE string The annotation will be removed.
EMBED string The annotation will be embedded into the resulting document, allowing it to still be modified.
PRINT string Processes the document for printing. Flattens annotations that can be printed, removes the remaining ones.
Source:

(static, readonly) ContextualMenuAppearance :string

The available appearance options of the edit menu. (iOS only)
Type:
  • string
Properties:
Name Type Description
HORIZONTAL_BAR string The edit menu appears as a horizontal bar.
CONTEXT_MENU string The edit menu appears as a context menu.
Source:

(static, readonly) ContextualMenuItemPosition :string

The position of the annotation menu items.
Type:
  • string
Properties:
Name Type Description
START string Add the new buttons at the start of the menu.
END string Add the new buttons at the end of the menu.
Source:

(static, readonly) ContextualMenuType :string

The type of annotation menu to customize.
Type:
  • string
Properties:
Name Type Description
SELECTION string Customize the Annotation Selection Menu.
Source:

(static, readonly) Flags :string

A set of flags specifying various characteristics of the annotation.
Type:
  • string
Properties:
Name Type Description
HIDDEN string If set, do not display or print the annotation or allow it to interact with the user.
INVISIBLE string If set, ignore annotation AP stream if there is no handler available.
LOCKED string If set, don’t allow the annotation to be deleted or its properties to be modified, except for contents.
LOCKED_CONTENTS string If set, don’t allow the contents of the annotation to be modified by the user.
PRINT string If set, print the annotation when the page is printed.
READ_ONLY string If set, don’t allow the annotation to be deleted or its properties to be modified, including contents.
NO_VIEW string If set, don’t display the annotation on the screen. (But printing might be allowed)
NO_ZOOM string If set, don’t scale the annotation’s appearance to match the magnification of the page. Supported only for FILE and STAMP annotations. (Android only)
Source:

(static, readonly) LineEnd :string

The available annotation line ends
Type:
  • string
Properties:
Name Type Description
NONE string
OPEN_ARROW string
CLOSED_ARROW string
CIRCLE string
SQUARE string
Source:

(static, readonly) Type :string

The available annotation types
Type:
  • string
Properties:
Name Type Description
ALL string
INK string
LINK string
HIGHLIGHT string
SQUIGGLY string
STRIKE_OUT string
UNDERLINE string
NOTE string
LINE string
POLYGON string
POLYLINE string
SQUARE string
FREE_TEXT string
STAMP string
IMAGE string
CARET string
RICH_MEDIA string
WIDGET string
WATERMARK string
FILE string
SOUND string
POPUP string
TRAP_NET string
THREE_DIMENSIONAL string
REDACTION string
Source:

Type Definitions

AnnotationContextualMenu

The object to customize the menu shown when selecting an annotation.
Properties:
Name Type Attributes Description
buttons Array.<AnnotationContextualMenuItem> The annotation menu items to display when an annotation is selected.
menuType Annotation.ContextualMenuType <optional>
Specifies the type of annotation menu to customize.
retainSuggestedMenuItems Boolean <optional>
Specifies whether the PSPDFKit suggested annotation menu items should be retained when custom annotation menu items are set.
appearance Annotation.ContextualMenuAppearance <optional>
Specifies for which appearance mode this change should apply to (iOS only).
position Annotation.ContextualMenuItemPosition <optional>
The position where the buttons should be added in the menu.
Source:

AnnotationContextualMenuItem

The annotation menu item used to display a custom button on the annotation menu.
Properties:
Name Type Attributes Description
id string The unique identifier for the custom annotation menu button. This will be used to identify the button in the onCustomAnnotationContextualMenuItemTapped callback. On Android the ID needs to be specified as a resource item inside your application's ids.xml file.
image string The image name (iOS) or resource ID (Android) for the toolbar button. Images must be included in the application bundle on iOS and specified as a drawable resource on Android. System image names can also be used on iOS, for example multiply.circle.fill. On iOS the image will only be used if no title is specified.
title string <optional>
The title of the toolbar button. If no title is set, the image will be used.
selectable boolean <optional>
Whether the button should be selectable or not. If the button is selectable, it will remain highlighted after being tapped (Android only).
Source:

AnnotationPresetConfiguration

The object to configure annotation presets.
Properties:
Name Type Attributes Description
inkPen AnnotationPresetInk <optional>
The inkPen annotation preset configuration.
inkMagic AnnotationPresetInk <optional>
The inkMagic annotation preset configuration.
inkHighlighter AnnotationPresetInk <optional>
The inkHighlighter annotation preset configuration.
freeText AnnotationPresetFreeText <optional>
The freeText annotation preset configuration.
freeTextCallout AnnotationPresetFreeText <optional>
The freeTextCallout annotation preset configuration.
stamp AnnotationPresetStamp <optional>
The stamp annotation preset configuration.
note AnnotationPresetNote <optional>
The note annotation preset configuration.
highlight AnnotationPresetMarkup <optional>
The highlight annotation preset configuration.
underline AnnotationPresetMarkup <optional>
The underline annotation preset configuration.
squiggly AnnotationPresetMarkup <optional>
The squiggly annotation preset configuration.
strikeOut AnnotationPresetMarkup <optional>
The strikeOut annotation preset configuration.
square AnnotationPresetShape <optional>
The square annotation preset configuration.
circle AnnotationPresetShape <optional>
The circle annotation preset configuration.
line AnnotationPresetLine <optional>
The line annotation preset configuration.
arrow AnnotationPresetLine <optional>
The arrow annotation preset configuration.
eraser AnnotationPresetEraser <optional>
The eraser annotation preset configuration.
file AnnotationPresetFile <optional>
The file annotation preset configuration.
polygon AnnotationPresetShape <optional>
The polygon annotation preset configuration.
polyline AnnotationPresetLine <optional>
The polyline annotation preset configuration.
sound AnnotationPresetSound <optional>
The sound annotation preset configuration.
redaction AnnotationPresetRedact <optional>
The redaction annotation preset configuration.
image AnnotationPresetStamp <optional>
The image annotation preset configuration.
audio AnnotationPresetSound <optional>
The audio annotation preset configuration.
measurementAreaRect AnnotationPresetMeasurementArea <optional>
The measurementAreaRect annotation preset configuration.
measurementAreaPolygon AnnotationPresetMeasurementArea <optional>
The measurementAreaPolygon annotation preset configuration.
measurementAreaEllipse AnnotationPresetMeasurementArea <optional>
The measurementAreaEllipse annotation preset configuration.
measurementPerimeter AnnotationPresetMeasurementPerimeter <optional>
The measurementPerimeter annotation preset configuration.
measurementDistance AnnotationPresetMeasurementDistance <optional>
The measurementDistance annotation preset configuration.
Source:

AnnotationPresetEraser

The object to customize the eraser annotation presets.
Properties:
Name Type Description
defaultThickness number
minimumThickness number
maximumThickness number
previewEnabled boolean
zIndexEditingEnabled boolean
forceDefaults boolean
supportedProperties Array.<string>
Source:

AnnotationPresetFile

The object to customize the file annotation presets.
Properties:
Name Type Description
zIndexEditingEnabled boolean
forceDefaults boolean
supportedProperties Array.<string>
Source:

AnnotationPresetFreeText

The object to customize the free text annotation presets.
Properties:
Name Type Description
defaultColor string
availableColors Array.<string>
customColorPickerEnabled boolean
defaultTextSize number
minimumTextSize number
maximumTextSize number
defaultFont string
availableFonts Array.<string>
zIndexEditingEnabled boolean
previewEnabled boolean
supportedProperties Array.<string>
forceDefaults boolean
Source:

AnnotationPresetInk

The object to customize the ink annotation presets.
Properties:
Name Type Description
defaultColor string
defaultFillColor string
defaultAlpha number
defaultThickness number
blendMode Annotation.BlendMode
availableColors Array.<string>
availableFillColors Array.<string>
minimumAlpha number
maximumAlpha number
minimumThickness number
maximumThickness number
customColorPickerEnabled boolean
previewEnabled boolean
zIndexEditingEnabled boolean
forceDefault boolean
supportedProperties Array.<string>
aggregationStrategy string
Source:

AnnotationPresetLine

The object to customize the line annotation presets.
Properties:
Name Type Description
defaultColor string
availableColors Array.<string>
defaultFillColor string
availableFillColors Array.<string>
customColorPickerEnabled boolean
defaultThickness number
minimumThickness number
maximumThickness number
defaultAlpha number
minimumAlpha number
maximumAlpha number
defaultLineEnd string Comma separated string of line ends. For example: 'openArrow,openArrow'. See https://pspdfkit.com/api/react-native/Annotation.html#.LineEnd for available options.
availableLineEnds Array.<Annotation.LineEnd>
defaultBorderStyle Annotation.BorderStyle
previewEnabled boolean
zIndexEditingEnabled boolean
supportedProperties Array.<string>
forceDefaults boolean
Source:

AnnotationPresetMarkup

The object to customize the markup annotation presets.
Properties:
Name Type Description
defaultColor string
defaultAlpha number
availableColors Array.<string>
minimumAlpha number
maximumAlpha number
customColorPickerEnabled boolean
zIndexEditingEnabled boolean
forceDefaults boolean
supportedProperties Array.<string>
Source:

AnnotationPresetMeasurementArea

The object to customize the measurement area annotation presets.
Properties:
Name Type Description
defaultColor string
defaultAlpha number
defaultThickness number
defaultBorderStyle Annotation.BorderStyle
availableColors Array.<string>
minimumAlpha number
maximumAlpha number
minimumThickness number
maximumThickness number
customColorPickerEnabled boolean
previewEnabled boolean
zIndexEditingEnabled boolean
supportedProperties Array.<string>
forceDefaults boolean
Source:

AnnotationPresetMeasurementDistance

The object to customize the measurement distance annotation presets.
Properties:
Name Type Description
defaultColor string
defaultAlpha number
defaultThickness number
defaultBorderStyle Annotation.BorderStyle
defaultLineEnd string Comma separated string of line ends. For example: 'openArrow,openArrow'. See https://pspdfkit.com/api/react-native/Annotation.html#.LineEnd for available options.
availableLineEnds Array.<Annotation.LineEnd>
availableColors Array.<string>
minimumAlpha number
maximumAlpha number
minimumThickness number
maximumThickness number
customColorPickerEnabled boolean
previewEnabled boolean
zIndexEditingEnabled boolean
supportedProperties Array.<string>
forceDefaults boolean
Source:

AnnotationPresetMeasurementPerimeter

The object to customize the measurement perimeter annotation presets.
Properties:
Name Type Description
defaultColor string
defaultAlpha number
defaultThickness number
defaultBorderStyle Annotation.BorderStyle
availableColors Array.<string>
defaultLineEnd string Comma separated string of line ends. For example: 'openArrow,openArrow'. See https://pspdfkit.com/api/react-native/Annotation.html#.LineEnd for available options.
availableLineEnds Array.<Annotation.LineEnd>
minimumAlpha number
maximumAlpha number
minimumThickness number
maximumThickness number
customColorPickerEnabled boolean
previewEnabled boolean
zIndexEditingEnabled boolean
supportedProperties Array.<string>
forceDefaults boolean
Source:

AnnotationPresetNote

The object to customize the note annotation presets.
Properties:
Name Type Description
defaultColor string
availableColors Array.<string>
customColorPickerEnabled boolean
defaultIconName string
availableIconNames Array.<string>
zIndexEditingEnabled boolean
forceDefaults boolean
supportedProperties Array.<string>
Source:

AnnotationPresetRedact

The object to customize the redact annotation presets.
Properties:
Name Type Description
defaultColor string
defaultFillColor string
availableColors Array.<string>
availableFillColors Array.<string>
customColorPickerEnabled boolean
previewEnabled boolean
zIndexEditingEnabled boolean
forceDefaults boolean
supportedProperties Array.<string>
Source:

AnnotationPresetShape

The object to customize the shape annotation presets.
Properties:
Name Type Description
defaultColor string
defaultFillColor string
defaultAlpha number
defaultThickness number
availableColors Array.<string>
availableFillColors Array.<string>
minimumAlpha number
maximumAlpha number
minimumThickness number
maximumThickness number
customColorPickerEnabled boolean
previewEnabled boolean
defaultBorderStyle Annotation.BorderStyle
zIndexEditingEnabled boolean
forceDefaults boolean
supportedProperties Array.<string>
Source:

AnnotationPresetSound

The object to customize the sound annotation presets.
Properties:
Name Type Description
audioSamplingRate number
audioRecordingTimeLimit number
zIndexEditingEnabled boolean
supportedProperties Array.<string>
forceDefaults boolean
Source:

AnnotationPresetStamp

The object to customize the stamp annotation presets.
Properties:
Name Type Description
availableStampItems Array.<string>
zIndexEditingEnabled boolean
supportedProperties Array.<string>
forceDefaults boolean
Source: