Hello benb, welcome to the Apryse community forum!
There is a difference between Standard and Custom stamps:
- Standard Stamps are Stamp types that are defined by the PDF spec, a list can be found here: Apryse Documentation | Documentation
- Custom Stamps are stamps that can be modified to have any look, as you are doing in your code snippet.
I think the solution here would be to disable the Standard Stamps and only use custom
WebViewer({
... constructor options ...
disabledElements: ['standardStampPanelButton', 'createCustomStampButton', 'deleteCustomStampButton'],
...
}, (instance) => {
const { annotationManager, documentViewer, Tools, Annotations } = instance.Core;
const stampTool = instance.Core.documentViewer.getTool(Tools.ToolNames.RUBBER_STAMP);
stampTool.setStandardStamps([]);
instance.UI.setSelectedTab('rubberStampTab', 'customStampPanelButton');
const customStamps = [{
title: "Approved",
subtitle: "[By $currentUser at] h:mm:ss a, MMMM D, YYYY",
opacity: .6,
id: 'approved',
},
{
title: "Not Approved",
subtitle: "[By $currentUser at] h:mm:ss a, MMMM D, YYYY",
color: new Annotations.Color('#D65656'),
opacity: .6,
id: 'not-approved'
},
];
stampTool.setCustomStamps(customStamps);
})
Let me know if this works for you,
Best regards,
Tyler