setStandardStamps not working in the angular

Product:

Product Version:

Please give a brief summary of your issue:
setStandardStamps not working in the angular

Please describe your issue and provide steps to reproduce it:
I am unable create setStandardStamps in angular. I have followed the official documentations Which provided by the apryse.

Please provide a link to a minimal sample where the issue is reproducible:

Hi @naga,

What exactly is not working? Are you receiving an error in the console? Can you provide us the code you’ve written so we can investigate further?

Thanks,
Adam

I am unable use the setStandardStamps feature to customize stamps.

const tool = documentViewer.getTool(‘AnnotationCreateRubberStamp’);

tool.setStandardStamps([
‘Approved’,
‘AsIs’,
http://localhost/stamps/cbimage3.png’,
]);

This code is not working

Hi @naga,

Thanks for your patience. Looks like we need to clarify the code sample a bit more on our end. You’d need to specify a port number if you’re using localhost or you can provide a relative path based on your web server.

Double check what your port # is when building/running your Angular project. By default I think it’s 4200.


const imageSource = 'http://localhost:4200/path/to/img.png';
// const imageSource = '/relative/path/to/image.png';
// const imageSource = 'https://publicurl.com/img.png';

tool.setStandardStamps([
  ‘Approved’,
  ‘AsIs’,
  imageSource
]);

For reference, I was able to get it working with this sample using a relative path:

const { documentViewer } = instance.Core;
const tool = documentViewer.getTool('AnnotationCreateRubberStamp');

// Your relative path will most likely be different.
// Don't expect this to work for you.
const pathToLogo = '/envs/blank/logo.png';

tool.setStandardStamps([
  'Approved',
  'AsIs',
  pathToLogo,
]);

Let me know how this works for you! I’ll add the documentation improvement to our backlog.

Thanks,
Adam