Annotation data
Export and restore the review layer
Add annotations with the viewer toolbar, export them as JSON, clear the layer, and restore it later.
Layer lifecycleExport, clear, restore
The document and its review annotations remain independent.
JSON
Portable review dataAnnotation JSON
Edit or retain this payload before loading it back into the viewer.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Load and save review annotations
Export the current annotation layer as JSON and load it again independently of the underlying document.
API used
TXDocumentViewer.annotations.export
Key members
Annotations are a separate JSON layer. Exporting and loading it lets applications save review work without rewriting the document.
const json = TXDocumentViewer.annotations.export();
TXDocumentViewer.annotations.load(json);
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/Annotations/LoadingSaving.