Namespaces

Classes

Annotation
Border
ButtonWidgetAnnotation
CaretAnnotation
CheckButtonWidgetAnnotation
ChoiceWidgetAnnotation
CustomAnnotation
EllipseAnnotation
FileAttachmentAnnotation
Font
Forms
EmbeddedJS
Field
FieldManager
FreeHandAnnotation
FreeTextAnnotation
HTMLAnnotation
IPathAnnotation
LineAnnotation
Link
ListWidgetAnnotation
MarkupAnnotation
Point
PolygonAnnotation
PolylineAnnotation
PopupAnnotation
Quad
RadioButtonWidgetAnnotation
Rect
RectangleAnnotation
RedactionAnnotation
SignatureWidgetAnnotation
StampAnnotation
StickyAnnotation
TextHighlightAnnotation
TextMarkupAnnotation
TextRedactAnnotation
TextSquigglyAnnotation
TextStrikeoutAnnotation
TextUnderlineAnnotation
TextWidgetAnnotation
WidgetAnnotation
WidgetFlags
AnnotationHistoryManager
AnnotationManager
BlackBoxAnnotationManager
Bookmark
DisplayMode
DisplayModeManager
Document
DocumentViewer
Header
BlackBoxPartRetriever
AnnotationEditTool
AnnotationSelectTool
AreaMeasurementCreateTool
ArrowCreateTool
CalloutCreateTool
CropCreateTool
DistanceMeasurementCreateTool
EllipseCreateTool
EraserTool
FileAttachmentCreateTool
FreeHandCreateTool
FreeTextCreateTool
GenericAnnotationCreateTool
LineCreateTool
MarqueeZoomTool
exports
PageCoordinate
PanTool
PerimeterMeasurementCreateTool
PolygonCloudCreateTool
PolygonCreateTool
PolylineCreateTool
RectangleCreateTool
RectangularAreaMeasurementTool
RedactionCreateTool
RubberStampCreateTool
SignatureCreateTool
StampCreateTool
StickyCreateTool
TextAnnotationCreateTool
TextHighlightCreateTool
TextSelectTool
TextSquigglyCreateTool
TextStrikeoutCreateTool
TextTool
TextUnderlineCreateTool
Tool
WebViewerInstance

Namespaces

Annotations
CoreControls
Tools
Hotkeys

Events


calculate

A signal that the field should fire its own calculation events.
Parameters:
Name Type Description
source Annotations.Forms.Field The field that caused the calculation event.
Listeners of This Event:

change

An event that represents a field's value having changed.
Parameters:
Name Type Description
field Annotations.Forms.Field The field that has changed.

commit

The field's value has been changed by the user. Sets a new value.
Parameters:
Name Type Argument Description
value string | number <nullable>
The new field value.
Listeners of This Event:

addReply

Triggered when a reply has been added to an annotation
Parameters:
Name Type Description
annotation object The annotation that was added
parent object The annotation that is the direct parent of the first annotation
root object The annotation that is the root parent of the first annotation (may be the same as parent)

annotationChanged

Triggered when an annotation or annotations have been changed (added, deleted, modified). Attach like annotManager.on('annotationChanged', callback)
Parameters:
Name Type Description
annotations Array.<Annotations.Annotation> The annotations that were changed
action string The action that occurred (add, delete, modify)
options object An object that has an imported property that will be true if the annotation change is the result of importing annotations using importAnnotations, importAnnotCommand or if the imported parameter is set to true when calling addAnnotations or deleteAnnotations

annotationDoubleClicked

Triggered after an annotation has been double clicked
Parameters:
Name Type Description
annotation object The annotation that has been double clicked

annotationHidden

Triggered after annotations have been hidden/shown.
Parameters:
Name Type Description
annotationList Array.<Annotations.Annotation> List of annotations that were hidden or shown
hidden boolean Whether the annotations have been hidden or shown

annotationsDrawn

Triggered after annotations have been drawn for a page
Parameters:
Name Type Description
pageNumber object The page number of all the annotations that were just drawn

annotationSelected

Triggered after annotation selection has been changed.
Parameters:
Name Type Description
annotationList Array.<Annotations.Annotation> List of annotations that have selected or deselected
action string Either 'selected' or 'deselected'

deleteReply

Triggered when a reply has been deleted from an annotation
Parameters:
Name Type Description
annotation object The annotation that was deleted
root object The annotation that is the root parent of the first annotation

fieldChanged

Triggered when a field's value has been changed. Attach like annotManager.on('fieldChanged', callback)
Parameters:
Name Type Description
field object The field that was changed
value string The field's new value

notify

Triggered when there is a notification related to annotations.
Parameters:
Name Type Description
type string The type of notification that has occurred

setNoteText

Triggered when the text should be set on a note
Parameters:
Name Type Description
annotation object The annotation that needs to have its note text updated
root object The annotation that is the root parent of the first annotation

updateAnnotationPermission

Triggered when permissions for annotations should be updated. This might be when the user changes or readonly is switched to. If no annotation is specified then every annotation should be updated.
Parameters:
Name Type Argument Description
annotation object <optional>
The annotation that needs to have its permissions updated

colorSeparationAdded

Triggered when a color separation is loaded and available on the document.
Parameters:
Name Type Description
colorData object An object with properties of the color separation
Properties
Name Type Description
name string The name of the color separation
rgb Array.<any> An array containing the R, G and B values for the separation

annotationsLoaded

Triggered when all the document annotations have been loaded

beforeDocumentLoaded

Triggered just before the document has been loaded into the viewer

changePage

Triggered when the page should be changed. Only fired when using a non-scrollable custom display mode.
Parameters:
Name Type Description
pageNum number The 1-indexed page number

click

Triggered for the click event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

dblClick

Triggered for the dblClick event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

displayModeUpdated

Triggered when the display mode is updated

displayPageLocation

Triggered when a page location should be displayed
Parameters:
Name Type Description
pageNum number The 1-indexed page number
verticalOffset number The offset from the top of the page
horizontalOffset number The offset from the left of the page

documentLoaded

Triggered when a new document has been loaded

documentUnloaded

Triggered when the current document has been closed and unloaded

fitModeUpdated

Triggered when the fit mode has changed
Parameters:
Name Type Description
fitMode object The fit mode that has been changed to e.g. docViewer.FitMode.FitWidth

keyDown

Triggered for the keyDown event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

keyUp

Triggered for the keyUp event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

layoutChanged

Triggered when the layout has changed because pages have permanently been added, removed, moved or changed in some other way.
Parameters:
Name Type Description
changes object An object with keys added, removed, moved and contentChanged, indicating which pages have changed

mouseEnter

Triggered for the mouseEnter event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

mouseLeave

Triggered for the mouseLeave event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

mouseLeftDown

Triggered for the mouseLeftButtonDown event in the DocumentViewer's viewing area Attach like docViewer.on('mouseLeftDown', callback)
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

mouseLeftUp

Triggered for the mouseLeftButtonUp event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

mouseMove

Triggered for the mouseMove event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

mouseRightDown

Triggered for the mouseRightButtonDown event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

mouseRightUp

Triggered for the mouseRightButtonUp event in the DocumentViewer's viewing area
Parameters:
Name Type Description
nativeEvt object Event object of the native JavaScript event

pageComplete

Triggered when a page has been completely rendered.
Parameters:
Name Type Description
pageIndex object The 0-indexed page index
canvas object The canvas for the page

pageNumberUpdated

Triggered when the page number is updated
Parameters:
Name Type Description
pageNumber number The new page number (1-indexed)

rotationUpdated

Triggered when the page rotation has changed
Parameters:
Name Type Argument Description
rotation CoreControls.PageRotation The new viewing rotation.
pageNumber number <optional>
Optionally the specific page number that had its rotation changed

searchInProgress

Triggered when a search starts or ends
Parameters:
Name Type Description
inProgress boolean Whether a search is in progress or not
isFullSearch boolean Whether this is a full text search or not

textSelected

Triggered when the selected text has changed
Parameters:
Name Type Description
quads Array.<Annotations.Quad> An array of bounding box quads of the selected text
text string The selected text
pageIndex number The zero-indexed page number that the text was selected on

toolModeUpdated

Triggered when the tool mode has changed
Parameters:
Name Type Description
toolModeClass object The tool object that has been changed to.

toolUpdated

Triggered when the tool styles or tool name have changed
Parameters:
Name Type Description
toolModeClass object The tool object that has been changed.

zoomUpdated

Triggered when the zoom level has been updated
Parameters:
Name Type Description
zoom number The new zoom level of the viewer

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

cropApplied

Fired when a crop is performed on the document
Parameters:
Name Type Description
cropInfo Object
Properties
Name Type Description
pageNumber number The page number the crop was applied on
left number The number of points (pts) cut off the left edge
right number The number of points (pts) cut off the right edge
bottom number The number of points (pts) cut off the bottom edge
top number The number of points (pts) cut off the top edge

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

erasingAnnotation

Triggered when an annotation is about to be deleted from the document by the tool
Parameters:
Name Type Description
args object Event arguments with event related properties
Properties
Name Type Description
annotation The annotation that will be deleted
skipAnnotation Annotations.FreeHandAnnotation A function you can call to skip deleting the annotation or points from a
Example
const eraserTool = docViewer.getTool('AnnotationEraserTool');

    eraserTool.on('erasingAnnotation', function(args) {
      // Make eraser tool skip deleting rectangle annotations
      if (args.annotation instanceof Annotations.RectangleAnnotation) {
        args.skipAnnotation();
      }
    });

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:
Overrides:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:
Overrides:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:
Overrides:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:
Overrides:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added

locationSelected

Triggered when a page location has been clicked on by the tool
Parameters:
Name Type Description
pageCoordinates Tools.PageCoordinate Indicates where the tool clicked

signatureDeleted

Triggered when the tool deletes a signature
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was deleted

signatureSaved

Triggered when the tool saves a signature
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was saved

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

selectionComplete

Triggered when the user has released the mouse after selecting text
Parameters:
Name Type Description
startLocation object An object with keys "quad" and "pageIndex" which is the starting quad and page index (0-indexed) of the text selection
allQuads object An object with keys being the page indexes and values being an array of quads for the selected text on that page

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From:

annotationAdded

Triggered when an annotation has been added to the document by the tool
Parameters:
Name Type Description
annotation Annotations.Annotation The annotation that was added
Inherited From:

annotationCreated

Triggered when an annotation has been created by the tool
Parameters:
Name Type Description
annotations Annotations.Annotation The annotation that was created
Inherited From: