Annotation layer
Review the loaded annotations
Use the annotation toolbar to add your own review mark, then compare it with the highlight, comment, text, and stamp objects loaded by the sample.
Independent layerExplore annotation types
The sample combines highlights, text, stamps, and comments in one layer.
4 TYPES
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Explore annotation types
Review highlights, comments, freehand ink, text, and stamps loaded as an independent JSON annotation layer.
API used
TXDocumentViewer.annotations.load
Key members
Highlights, comments, ink, text, and stamps share one serializable annotation layer and can be restored together.
TXDocumentViewer.annotations.load(
JSON.stringify(annotations)
);
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/AnnotationTypes.