Do you have an issue with a specific file(s)?
No
Can you reproduce using one of our samples or online demos?
No
Are you using the WebViewer server?
No
Does the issue only happen on certain browsers?
No
Is your issue related to a front-end framework?
No
Is your issue related to annotations?
Yes
Please give a brief summary of your issue:
Create custom annotation from image/svg
Please describe your issue and provide steps to reproduce it:
I have a list of icons in svg/png and I would like to add them to a dropdown so the user can click to the icon and it’s gonna insert to the pdf like stamp annotations.
Please provide a link to a minimal sample where the issue is reproducible:
WebViewer currently doesn’t have an API exposed for that kind of behaviour. We will add it to our backlog as a feature request for our Product Team to review.
You can read more about our Stamp Annotations here:
thanks, but it also resizes existing stamp annotations, whilst I only want to apply this for newly added annotation as default size and the user can resize it later.
The code snippet we have provided adds an event listener which only triggers when adding a new StampAnnotation. It shouldn’t affect the existing annotations whatsoever. Can you point out how this is different from the behaviour you mentioned above?
thanks, it’s working now, but it would be good if we can also resize the preview annotation as well, currenlty it only resize the annotation after you’ve place it to the doc so the user has to drag it again to the correct place.
Preview annotation which default big size
The actual size after it’s been placed which is small.
WebViewer currently does not have an API for the behaviour you requested. Because preview image is just an image, not an annotation. We have submitted a feature request to our Product Team to review.