API Reference
Technical API reference for global and annotation-level styles using the SDK.
Use viewer.styles to set default appearance for new markup and to inspect or update properties for an existing annotation by GUID.
Style commands are available after the viewer is mounted, Canvas is ready, and a document is open.
Apply default fallback settings for all subsequent annotations drawn on the canvas:
Inspect the style properties of a drawn markup:
Apply dynamic properties styling overrides directly to an annotation by GUID:
Supported configuration payloads and returned schemas:
In SDK 2.2.3, style commands check broker readiness and forward values without runtime GUID, timeout, color, line-width, or transparency validation. Required TypeScript fields do not establish runtime validation.
guidis a required TypeScript field for annotation-specific functions; select an existing annotation in the host before requesting its properties.getAnnotationProperties()uses per-calltimeoutMswhen supplied, otherwise the viewer configurationcommandTimeoutMs, whose default is 30000 ms.- The examples passing
timeoutMs: 10000use an explicit override, not the default. - Validate host inputs before sending them. This reference does not establish Canvas-side validation or accepted ranges.
Complete integration code setup for Vanilla HTML/JS environments:
Broker message mappings for styling methods:
viewer.styles.setGlobalAppearance(...)maps tosetGlobalAppearance.viewer.styles.getAnnotationProperties(...)maps togetAnnotationProperties.viewer.styles.setAnnotationProperties(...)maps tosetAnnotationProperties.
