Rasterex APINPM Package/docs/components/placement/api

API References

Technical reference for placement-related canvas methods.

Stamp Control

Use viewer.tools.stamps to open or close the canvas stamp placement UI, and use upload when your application needs to add remote stamp URLs into the active canvas session.

// Open the stamp panel
await viewer.tools.stamps.open();

// Close the stamp panel
await viewer.tools.stamps.close();

// Upload remote stamps
const result = await viewer.tools.stamps.upload({
  urls: ['https://example.com/stamp1.png', 'https://example.com/stamp2.png'],
  openPanel: true
});

console.log(result.success);
console.log(result.results); // Array of detailed results per URL
Stamp Control

Symbols Control

Use viewer.tools.symbols to open, close, or toggle the canvas symbols panel programmatically.

// Open the symbols panel
await viewer.tools.symbols.open();

// Close the symbols panel
await viewer.tools.symbols.close();

// Toggle the symbols panel
const result = await viewer.tools.symbols.toggle();

console.log('Panel is now:', result.opened ? 'Open' : 'Closed');
Symbols Control