Events
Viewer Event Reference
Full list of strongly-typed ViewerEventName values.
Subscribe using addEventListener and unsubscribe using removeEventListener.
Event categories
| Category | Events |
|---|---|
| Annotations | 20 |
| Bookmarks | 7 |
| Comments | 8 |
| Crop Area | 2 |
| Document | 3 |
| Forms | 12 |
| History | 5 |
| Instant | 1 |
| Page | 1 |
| Search | 2 |
| Signatures | 8 |
| Text Line | 1 |
| Text Selection | 1 |
| Toolbar | 5 |
| View State | 3 |
Annotations
| Event | Payload | Trigger |
|---|---|---|
annotationNote.hover | [ { annotationId?: string; pageIndex?: number; nativeEvent?: PointerEvent }, ] | Fires when a note annotation is hovered. |
annotationNote.press | [ { annotationId?: string; pageIndex?: number; nativeEvent?: PointerEvent }, ] | Fires when a note annotation is pressed. |
annotationPresets.update | [AnnotationPresetMap] | Fires when annotation preset definitions are updated. |
annotations.blur | [ImmutableList<Annotation>] | Fires when annotation focus is cleared. |
annotations.change | [] | Fires after annotation collections change. |
annotations.copy | [ImmutableList<Annotation>] | Fires after selected annotations are copied. |
annotations.create | [ImmutableList<Annotation>] | Fires after annotations are created. |
annotations.cut | [ImmutableList<Annotation>] | Fires after selected annotations are cut. |
annotations.delete | [ImmutableList<Annotation>] | Fires after annotations are deleted. |
annotations.didSave | [ImmutableList<Annotation>] | Fires after annotations are persisted. |
annotations.duplicate | [ImmutableList<Annotation>] | Fires after annotations are duplicated. |
annotations.focus | [ImmutableList<Annotation>] | Fires when annotations receive focus/selection. |
annotations.load | [ImmutableList<Annotation>] | Fires when annotations are loaded. |
annotations.paste | [ImmutableList<Annotation>] | Fires after annotations are pasted. |
annotations.press | [AnnotationPressEventPayload] | Fires when an annotation press interaction occurs. |
annotations.transform | [ImmutableList<Annotation>] | Fires when annotations are transformed (move/resize). |
annotations.update | [ImmutableList<Annotation>] | Fires after annotations are updated. |
annotations.willChange | [AnnotationWillChangeEventPayload] | Fires before annotation collections change. |
annotations.willSave | [ImmutableList<Annotation>] | Fires before annotations are persisted. |
annotationSelection.change | [ImmutableList<Annotation>] | Fires when the selected annotation set changes. |
Bookmarks
| Event | Payload | Trigger |
|---|---|---|
bookmarks.change | [ImmutableList<Bookmark>] | Fires after bookmark collections change. |
bookmarks.create | [ImmutableList<Bookmark>] | Fires after bookmarks are created. |
bookmarks.delete | [ImmutableList<Bookmark>] | Fires after bookmarks are deleted. |
bookmarks.didSave | [ImmutableList<Bookmark>] | Fires after bookmarks are persisted. |
bookmarks.load | [ImmutableList<Bookmark>] | Fires when bookmarks are loaded. |
bookmarks.update | [ImmutableList<Bookmark>] | Fires after bookmarks are updated. |
bookmarks.willSave | [ImmutableList<Bookmark>] | Fires before bookmarks are persisted. |
Comments
| Event | Payload | Trigger |
|---|---|---|
comments.change | [CommentsChangeEventPayload] | Fires after the comment collection changes. |
comments.create | [CommentListEventPayload] | Fires after comments are created. |
comments.delete | [CommentListEventPayload] | Fires after comments are deleted. |
comments.didSave | [CommentListEventPayload] | Fires after comments are persisted. |
comments.load | [CommentListEventPayload] | Fires when comments are loaded. |
comments.mention | [CommentListEventPayload] | Fires when comment mentions are detected. |
comments.update | [CommentListEventPayload] | Fires after comments are updated. |
comments.willSave | [CommentListEventPayload] | Fires before comments are persisted. |
Crop Area
| Event | Payload | Trigger |
|---|---|---|
cropArea.changeStart | [CropAreaChangeEventPayload] | Fires when a crop area interaction starts. |
cropArea.changeStop | [CropAreaChangeEventPayload] | Fires when a crop area interaction stops. |
Document
| Event | Payload | Trigger |
|---|---|---|
document.change | [ { reason: 'load' | 'saveStateChange'; pageCount?: number; hasUnsavedChanges?: boolean; }, ] | Fires when document load/save-state transitions occur. |
document.load | [{ pageCount: number; source?: ViewerDocumentSource }] | Fires when a document load completes. |
document.saveStateChange | [{ hasUnsavedChanges: boolean }] | Fires when unsaved-changes state toggles. |
Forms
| Event | Payload | Trigger |
|---|---|---|
formFields.change | [ImmutableList<FormField>] | Fires after form field definitions change. |
formFields.create | [ImmutableList<FormField>] | Fires after form fields are created. |
formFields.delete | [ImmutableList<FormField>] | Fires after form fields are deleted. |
formFields.didSave | [ImmutableList<FormField>] | Fires after form fields are persisted. |
formFields.load | [ImmutableList<FormField>] | Fires when form fields are loaded. |
formFields.update | [ImmutableList<FormField>] | Fires after form fields are updated. |
formFields.willSave | [ImmutableList<FormField>] | Fires before form fields are persisted. |
formFieldValues.didSave | [FormFieldValueMap] | Fires after form field values are persisted. |
formFieldValues.update | [FormFieldValueMap] | Fires after form field values are updated. |
formFieldValues.willSave | [FormFieldValueMap] | Fires before form field values are persisted. |
forms.didSubmit | [{ formFieldValues: FormFieldValueMap }] | Fires after a form submit lifecycle completes. |
forms.willSubmit | [{ formFieldValues: FormFieldValueMap }] | Fires before a form submit lifecycle starts. |
History
| Event | Payload | Trigger |
|---|---|---|
history.change | [HistoryChangeEvent] | Fires after history stack state changes. |
history.clear | [HistoryChangeEvent] | Fires when history is cleared. |
history.redo | [HistoryChangeEvent] | Fires when a redo operation is applied. |
history.undo | [HistoryChangeEvent] | Fires when an undo operation is applied. |
history.willChange | [HistoryChangeEvent] | Fires before history stack state changes. |
Instant
| Event | Payload | Trigger |
|---|---|---|
instant.connectedClients.change | [unknown[]] | Fires when the connected-clients list changes. |
Page
| Event | Payload | Trigger |
|---|---|---|
page.press | [ { pageIndex: number; point: Point; nativeEvent: PointerEvent; }, ] | Fires when page surface interactions occur. |
Search
| Event | Payload | Trigger |
|---|---|---|
search.stateChange | [SearchState] | Fires when search state values (query, results, active index) change. |
search.termChange | [{ term: string; preventDefault: () => void }] | Fires when a new search term is requested. |
Signatures
| Event | Payload | Trigger |
|---|---|---|
inkSignatures.change | [ImmutableList<StoredSignature>] | Fires after ink signature presets change. |
inkSignatures.create | [ImmutableList<StoredSignature>] | Fires after ink signature presets are created. |
inkSignatures.delete | [ImmutableList<StoredSignature>] | Fires after ink signature presets are deleted. |
inkSignatures.update | [ImmutableList<StoredSignature>] | Fires after ink signature presets are updated. |
storedSignatures.change | [ImmutableList<StoredSignature>] | Fires after stored signature presets change. |
storedSignatures.create | [ImmutableList<StoredSignature>] | Fires after stored signature presets are created. |
storedSignatures.delete | [ImmutableList<StoredSignature>] | Fires after stored signature presets are deleted. |
storedSignatures.update | [ImmutableList<StoredSignature>] | Fires after stored signature presets are updated. |
Text Line
| Event | Payload | Trigger |
|---|---|---|
textLine.press | [{ line: TextLine; pageIndex: number; nativeEvent?: PointerEvent }] | Fires when a text line is pressed. |
Text Selection
| Event | Payload | Trigger |
|---|---|---|
textSelection.change | [TextSelection | null] | Fires when text selection changes. |
Toolbar
| Event | Payload | Trigger |
|---|---|---|
toolbar.annotationItemsChange | [ToolbarItemsChangeEvent] | Fires when annotation toolbar items change. |
toolbar.documentEditorFooterItemsChange | [ToolbarItemsChangeEvent] | Fires when document editor footer items change. |
toolbar.documentEditorItemsChange | [ToolbarItemsChangeEvent] | Fires when document editor toolbar items change. |
toolbar.inlineTextItemsChange | [ToolbarItemsChangeEvent] | Fires when inline text selection toolbar items change. |
toolbar.itemsChange | [ToolbarItemsChangeEvent] | Fires when main toolbar items change. |
View State
| Event | Payload | Trigger |
|---|---|---|
viewState.change | [ViewState, ViewState] | Fires when the full view state object changes. |
viewState.currentPageIndex.change | [number] | Fires when the current page index changes. |
viewState.zoom.change | [number] | Fires when the zoom level changes. |
Use this page as the canonical list of typed viewer events and event payload contracts.