NPM Package/docs/components/measurement/save
Save and Auto-Save Annotations
Save current Canvas annotations, and enable or disable Canvas auto-save behavior using the SDK.
Use viewer.annotations.save(...) to save current Canvas annotations, and viewer.annotations.setAutoSave(...) to enable or disable Canvas auto-save behavior.
Save commands are available after the viewer is mounted, Canvas is ready, and a document is open.
typescript
Overview
Invoke the save operation and wait for completion:
save(...)sendssaveAnnotationsand waits forsaveAnnotationsCompletewith the matching request ID.- Use
timeoutMsto define custom save timeout intervals:
Save with custom timeout
typescript
Save Annotations
SDK save result format:
typescript
Result Shape
Toggle auto-save configurations on Canvas:
setAutoSave(...)is a fire-and-forget command.
typescript
Auto-Save Control
Complete integration code setup for Vanilla HTML/JS environments:
Vanilla Example
Complete React Component implementation details:
tsx
React Integration
Broker message mapping for save APIs:
viewer.annotations.save(...)maps tosaveAnnotations/saveAnnotationsComplete.viewer.annotations.setAutoSave(...)maps tosetAutoSave.
