Annotations Class
Description
Controls annotation import/export, stamp definitions, and annotation UI.
Syntax
AnnotationsExamples
The following example demonstrates Annotations in a practical Document Viewer workflow. This object provides functionalities for working with annotations.
const annotationJson = TXDocumentViewer.annotations.export();
console.log("Current annotations:", JSON.parse(annotationJson));Members
Methods
| Method | Description |
|---|---|
| export | Serializes the page-indexed annotation collection as JSON. |
| getStampList | Returns the current stamp definitions. |
| load | Replaces the collection with annotations from viewer JSON. |
| setStampList | Replaces the toolbar's stamp definitions. |
| showSidebar | Shows or hides the comments sidebar. |
| showToolbar | Shows, hides, or toggles the annotation toolbar. Showing the toolbar also activates annotation editing. |