Modules

Classes

Action
Dest
GoTo
GoToR
Hide
JavaScript
Named
ResetForm
URI
Annotation
Border
BoxControlHandle
BoxSelectionModel
ButtonWidgetAnnotation
CalloutControlHandle
CalloutSelectionModel
CaretAnnotation
CheckButtonWidgetAnnotation
ChoiceWidgetAnnotation
Color
ControlHandle
CustomAnnotation
DatePickerWidgetAnnotation
EllipseAnnotation
FileAttachmentAnnotation
Font
Forms
EmbeddedJS
Field
FieldManager
FreeHandAnnotation
FreeTextAnnotation
Editor
FreeTextSelectionModel
HTMLAnnotation
IPathAnnotation
LineAnnotation
LineControlHandle
LineSelectionModel
Link
ListWidgetAnnotation
MarkupAnnotation
PathControlHandle
PathSelectionModel
Point
PolygonAnnotation
PolygonControlHandle
PolygonSelectionModel
PolylineAnnotation
PopupAnnotation
Quad
RadioButtonWidgetAnnotation
Rect
RectangleAnnotation
RedactionAnnotation
RedactionSelectionModel
SelectionModel
SignatureWidgetAnnotation
StampAnnotation
StickyAnnotation
TextHighlightAnnotation
TextMarkupAnnotation
TextRedactAnnotation
TextSelectionModel
TextSquigglyAnnotation
TextStrikeoutAnnotation
TextUnderlineAnnotation
TextWidgetAnnotation
WidgetAnnotation
WidgetFlags
AnnotationHistoryManager
AnnotationManager
BlackBoxAnnotationManager
Bookmark
DisplayMode
DisplayModeManager
Document
DocumentViewer
EditBoxManager
EventHandler
Header
AndroidContentPartRetriever
ArrayBufferPdfPartRetriever
AzurePartRetriever
BlackBoxPartRetriever
ExternalPdfPartRetriever
HttpPartRetriever
IOSPartRetriever
LocalPartRetriever
LocalPdfPartRetriever
PartRetriever
StreamingPartRetriever
WinRTPartRetriever
Action
ActionParameter
Annot
AnnotBorderStyle
AppearanceReferenceList
AttrObj
Bookmark
CaretAnnot
CheckBoxWidget
ChunkRenderer
CircleAnnot
ClassMap
ColorPt
ColorSpace
ComboBoxWidget
ContentItem
ContentReplacer
ConversionMonitor
Convert
OfficeToPDFOptions
XODOutputOptions
XPSOutputCommonOptions
XPSOutputOptions
Date
Destination
DictIterator
DiffOptions
DigestAlgorithm
DigitalSignatureField
DisallowedChange
DocSnapshot
DocumentConversion
Element
ElementBuilder
ElementReader
ElementWriter
FDFDoc
FDFField
Field
FileAttachmentAnnot
FileSpec
Filter
FilterReader
FilterWriter
Flattener
Font
FreeTextAnnot
Function
GeometryCollection
GState
HighlightAnnot
Highlights
Image
InkAnnot
Iterator
KeyStrokeActionResult
KeyStrokeEventData
LineAnnot
LinkAnnot
ListBoxWidget
MarkupAnnot
Matrix2D
MovieAnnot
NameTree
NumberTree
Obj
ObjSet
OCG
OCGConfig
OCGContext
OCMD
Optimizer
ImageSettings
MonoImageSettings
OptimizerSettings
TextSettings
OwnedBitmap
Page
PageLabel
PageSet
PatternColor
PDFACompliance
PDFDC
PDFDCEX
PDFDoc
PDFDocInfo
PDFDocViewPrefs
PDFDraw
PDFRasterizer
PDFView
PDFViewCtrl
Point
PolygonAnnot
PolyLineAnnot
PopupAnnot
PrinterMode
ProgressMonitor
PushButtonWidget
QuadPoint
RadioButtonGroup
RadioButtonWidget
Rect
Redaction
RedactionAnnot
Redactor
ResultSnapshot
RoleMap
RubberStampAnnot
ScreenAnnot
SDFDoc
SecurityHandler
SElement
Shading
SignatureHandler
SignatureWidget
SoundAnnot
SquareAnnot
SquigglyAnnot
Stamper
STree
StrikeOutAnnot
TextAnnot
TextExtractor
TextExtractorLine
TextExtractorStyle
TextExtractorWord
TextMarkupAnnot
TextSearch
TextWidget
TrustVerificationResult
UnderlineAnnot
UndoManager
VerificationOptions
VerificationResult
ViewChangeCollection
WatermarkAnnot
WidgetAnnot
SubmitForm
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
Video
WebViewerInstance
MentionsManager

Mixins

Dispatcher

Namespaces

Actions
Annotations
CoreControls
PartRetrievers
PDFNet
Tools
utils
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)
info CoreControls.AnnotationManager.AnnotationChangedInfoObject An object containing extra information about the annotationChanged event

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

blackBoxAnnotationsDisabled

Triggered when collaboration has abruptly closed or been disabled. Attach like bbAnnotManager.on('blackBoxAnnotationsDisabled', callback)

blackBoxAnnotationsEnabled

Triggered when collaboration is enabled for blackbox. Attach like bbAnnotManager.on('blackBoxAnnotationsEnabled', callback)
Parameters:
Name Type Description
the string user name as specified by blackbox collaboration.
the string user ID as specified by blackbox collaboration.

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

editorBlurred

Triggered after an editor blurred
Parameters:
Name Type Description
editor Annotations.FreeTextAnnotation.Editor an instance of Editor
annotation Annotations.FreeTextAnnotation a freetext annotation

editorFocused

Triggered after an editor is focused
Parameters:
Name Type Description
editor Annotations.FreeTextAnnotation.Editor an instance of Editor
annotation Annotations.FreeTextAnnotation a freetext annotation

editorSelectionChanged

Triggered after selection in the editor changed
Parameters:
Name Type Description
range CoreControls.EditBoxManager.Range current selected range
oldRange CoreControls.EditBoxManager.Range previous selected range

editorTextChanged

Triggered after some text in the editor changed

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:

mentionChanged

Triggered when a mention or mentions have been changed (added, deleted, modified). Attach like instance.mentions.on('mentionChanged', callback)
Parameters:
Name Type Description
mentions WebViewerInstance.MentionsManager.Mention The mentions that were changed
action 'add' | 'modify' | 'delete' The action that occurred (add, delete, modify)