Annotation

Members

(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:

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: