NPM Package/docs/components/placement/stamp
Stamp
Control the canvas stamp panel and upload remote stamp URLs from the host application using the SDK.
Use viewer.tools.stamps to open, close, or toggle the Canvas stamp panel, and to upload remote image URLs into the Canvas stamp store.
Stamp tools are available after the viewer is mounted, Canvas is ready, and a document is open.
typescript
Overview
Open, close, or toggle the panel state programmatically. These methods return a Promise resolving to the panel status:
viewer.tools.stamps.open()sendsstampControlwithcommand: "open"and waits forstampControlResult.- You can specify an optional custom timeout:
Toggle stamp panel with timeout
typescript
Open, Close or Toggle Panel
Preload remote image URLs directly into the active Canvas stamp store:
urlsmust be image URLs that the Canvas iframe is allowed to fetch (browser File objects are not supported).- When
openStampPanelistrue, Canvas automatically enables theSTAMPtool and reveals the panel after uploading.
typescript
Upload Stamps
Typings and result shapes for stamp workflows:
typescript
Types Reference
Complete integration code setup for Vanilla HTML/JS environments:
Vanilla Example
Broker message mapping for stamp tools:
viewer.tools.stamps.open(...)maps tostampControl/stampControlResult.viewer.tools.stamps.close(...)maps tostampControl/stampControlResult.viewer.tools.stamps.toggle(...)maps tostampControl/stampControlResult.viewer.tools.stamps.upload(...)maps touploadStamp/uploadStampResult.
