Stamp
Control the viewer stamp panel and upload remote stamp URLs from the host application.
Use `stampControl` to open or close the viewer stamp placement UI.
Use `uploadStamp` to send one or more remote stamp URLs into the active viewer session and observe the result through `uploadStampResult`.
- Open: show the stamp placement UI inside the active viewer session.
- Close: dismiss the stamp placement UI programmatically.
- Upload remote stamps: provide one or more stamp URLs and optionally request that the viewer opens the stamp panel after upload.
- Optional request ID: include `requestId` when you want to correlate logs on the host side.
Send `stampControl` with the required `command` field.
Open Stamp UI
Close Stamp UI
Send `uploadStamp` with one or more remote URLs when the host needs to preload stamps into the viewer session.
The viewer responds with `uploadStampResult`, including per-item results and whether the panel ended in an opened state.
Upload stamp URLs
Handle uploadStampResult
Keep the host workflow simple and send the command only after the viewer is ready.
- 11. Wait for readiness: Make sure the iframe session is active before sending stamp commands.
- 22. Open placement: Send `stampControl` with `command: "open"` when the user starts stamp placement.
- 33. Upload stamps when needed: Send `uploadStamp` with one or more remote URLs and decide whether `openStampPanel` should be `true` or `false`.
- 44. Observe `uploadStampResult`: Use the response payload to inspect per-item success and final panel state.
- 55. Close when needed: Send `command: "close"` to dismiss it programmatically.
This example wires stamp open, close, and upload actions to the current viewer iframe.
Continue with related placement workflows.
- Symbols: Symbols
- Placement API: API References
- Viewer Setup: Canvas
