Javascript: Annotations.load Method
Description
Replaces the collection with annotations from viewer JSON.
Syntax
<void> Annotations.load(<string> json)Parameters
| Parameter | Description |
|---|---|
| json | JSON string containing the serialized annotations. |
Return Value
Replaces the collection with annotations from viewer JSON.
Examples
The following example demonstrates annotations.load in a practical Document Viewer workflow. Loads annotations from a JSON string.
function restoreAnnotations(annotationJson) {
JSON.parse(annotationJson);
TXDocumentViewer.annotations.load(annotationJson);
TXDocumentViewer.annotations.showSidebar(true);
}