Skip to main content
MuPDF WebViewer can listen for the following events: In order to register a listener just use the webViewer.addEventListener method.

TypeScript Signatures

Event Data Map

event.data payloads by event type:

Examples

Page Change

Redaction and Annotation Events

Redaction Create Event

Annotation Removed Event

Key Events

Pointer Events

Listening for Multiple Key Presses

For example, if you would like to add a shortcut for ctrl+s to save a document you could do the following to register for multiple key presses:

Removing Event Listeners

Event listeners can be removed using the webViewer.removeEventListener method. You need to pass in the same function reference that was used to add the event listener.