TX Text Control .NET Server

Javascript: Annotations.load Method

Method|Introduced in 29.0

Description

Replaces the collection with annotations from viewer JSON.

Syntax

<void> Annotations.load(<string> json)

Parameters

ParameterDescription
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);
}