Live event stream
Trigger viewer events
Add or edit an annotation, then complete the signature field. Each event is appended to the log below.
Event monitorViewer activity
The log updates without polling whenever the viewer raises a subscribed event.
LIVE
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
React to viewer events
Subscribe to annotation and signature events to connect document review activity with application workflows.
API used
TXDocumentViewer.addEventListener
Key members
Event listeners connect annotation and signature activity to application state without polling the document.
TXDocumentViewer.addEventListener("annotationChanged", event => {
appendEvent(event);
});
How it works
The Razor helper prepares the browser viewer and its document. Demo-specific JavaScript uses the public TXDocumentViewer API and remains encapsulated with this demo.
NuGet packages
Displays supported document and PDF formats in the browser.
dotnet add package TXTextControl.Web.DocumentViewer --version 34.2.0
Source files
See the implementation
The view, browser behavior, assets, and controller are encapsulated in Demos/DocumentViewer/Advanced/Events.