# How to apply Rubber stamp annotation without explicitly selecting stamp. (SOS)

**URL:** https://pdfjs.community/t/how-to-apply-rubber-stamp-annotation-without-explicitly-selecting-stamp-sos/198
**Category:** Technical Support
**Tags:** pdfjs-express
**Created:** [August 17, 2020, 12:05pm UTC](https://pdfjs.community/t/how-to-apply-rubber-stamp-annotation-without-explicitly-selecting-stamp-sos/198 "2020-08-17T12:05:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kiran.patil](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kiran.patil](https://pdfjs.community/u/kiran.patil)
#### Post date: [August 17, 2020, 12:05pm UTC](https://pdfjs.community/t/how-to-apply-rubber-stamp-annotation-without-explicitly-selecting-stamp-sos/198/1 "2020-08-17T12:05:28Z")

</div>

I have used this method. For creating rubber stamp, I have called setToolMode() for setting the stamp on mouse click. Now I am getting that ‘+’ cursor but it doesn’t add any stamp on the webviewer. I dont want to select that standard stamp instead I want to have that stamp ready to use as soon as I call this method.  
Whenever I call this method, that standard stamp should enabled on the cursor and I will be directly drawing it on the webviewer. I should not be used to select that standard stamp.

> if (selectedFunction === ‘stamp’) {  
> const tool = this.viewerInstance.docViewer.getTool(‘AnnotationCreateRubberStamp’);  
> tool.setStandardStamps([‘SHAccepted’]);  
> tool.setRubberStamp(tool);  
> this.viewerInstance.docViewer.setToolMode(tool);  
> }

---

<div class="post-metadata">

### Author: ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)
#### Post date: [August 17, 2020, 3:20pm UTC](https://pdfjs.community/t/how-to-apply-rubber-stamp-annotation-without-explicitly-selecting-stamp-sos/198/2 "2020-08-17T15:20:55Z")

</div>

Hi!

Your code was pretty close, you were just passing the wrong thing into `setToolMode`. This code should work for you.

```javascript
    const tool = docViewer.getTool('AnnotationCreateRubberStamp');
    tool.setStandardStamps(['SHAccepted']);
    const annots = await tool.getStandardStampAnnotations();
    tool.setRubberStamp(annots[0]);
    instance.setToolMode('AnnotationCreateRubberStamp'); // sets it in the UI

```

Thanks,  
Logan
