Create only 1 tab under stamps

WebViewer Version:

Please give a brief summary of your issue:
I need to create only 1 tab under stamps which is “my stamps”. This will have stamps created by myself.
These stamps should not have delete icon like custom stamps.
It should be just like standard stamps but should list my stamps.

Hello Priya,

Thank you for contacting WebViewer Forums.

You can overwrite the standards tab to include only your stamps. You can access the tool like this:

const stampTool = instance.Core.documentViewer.getTool(Tools.ToolNames.RUBBER_STAMP);

More information on its methods and APIs here: Apryse WebViewer Class: RubberStampCreateTool

Regards,
Luke

I disabled the standard stamp tab using the below code and added few custom stamps.
const customStamps = [{
title: “Test stamp1”,
subtitle: “[By $currentUser at] h:mm:ss a, MMMM D, YYYY”,
opacity: .6,
id: ‘stamp1’,
},
{
title: “Test stamp2”,
subtitle: “[By $currentUser at] h:mm:ss a, MMMM D, YYYY”,
color: new instance.Core.Annotations.Color(‘#D65656’),
opacity: .6,
id: ‘not-stamp2’
},
];
const stampTool = instance.Core.documentViewer.getTool(instance.Core.Tools.ToolNames.RUBBER_STAMP);
instance.UI.setSelectedTab(‘rubberStampTab’, ‘customStampPanelButton’);
instance.UI.disableElements([‘standardStampPanelButton’, ‘createStampButton’]);
stampTool.setStandardStamps([]);
stampTool.setCustomStamps(customStamps);

Is it possible to add an image into the custom stamp list

Hello Priya,

Yes, it is possible to add images to the stamp list. Below, I have overwritten the standard stamp list with a local image. You can modify it for custom stamps list as well:

const newStamp = '/files/butterfly.png';
const tool = documentViewer.getTool('AnnotationCreateRubberStamp');

tool.setStandardStamps([newStamp]);

Regards,
Luke

can we have an extra tab to include my stamps which is just like standard stamps?

Hello Priya,

It is currently not possible to create a new tab with our current APIs. Here are a couple solutions you may be interested in:

  1. You can overwrite the standard stamps to show only your defined stamps
  2. Fork our open source and extend the UI: Advanced-customization | Apryse Documentation
  3. Take a look at Modular UI and see if the layout suits your use-case better: WebViewer UI Customization Demo | Apryse WebViewer

Regards,
Luke