# How to move rubber stamp out of mis tool and remove another group annotation

**URL:** <https://pdfjs.community/t/how-to-move-rubber-stamp-out-of-mis-tool-and-remove-another-group-annotation/844>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [June 24, 2021, 2:44am UTC](https://pdfjs.community/t/how-to-move-rubber-stamp-out-of-mis-tool-and-remove-another-group-annotation/844 "2021-06-24T02:44:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/tony/32/427_2.png) [@tony](https://pdfjs.community/u/tony)\
**Post date:** [June 24, 2021, 2:44am UTC](https://pdfjs.community/t/how-to-move-rubber-stamp-out-of-mis-tool-and-remove-another-group-annotation/844/1 "2021-06-24T02:44:44Z")

</div>

**PDF.js Express Version**

**Detailed description of issue**  
{I want to move the rubber stamp group out of the mis tools, and place it on the header to eliminate action click from user,

 ![2021-06-24_09-36-23](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/e6a37f7930dfc44c204ee5fea6823d6777c08d8c.png)  
}

**Expected behaviour**  
{when i use header.delete(indexNo) base on the console index, look like the order is not corrected. For example when i use header.delete(13), it will delete signature group, but the index(13) show in the console is shapeTools

 ![2021-06-23_17-51-12](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ee2d6ea8bc087e87e1bbff24092a1c16de0a0517.jpeg)

}

**Does your issue happen with every document, or just one?**  
{Yes}

**Link to document**  
{Provide a link to the document in question if possible}

**Code snippet**  
{header.delete(13)}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [June 24, 2021, 2:44am UTC](https://pdfjs.community/t/how-to-move-rubber-stamp-out-of-mis-tool-and-remove-another-group-annotation/844/2 "2021-06-24T02:44:49Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:
- [Create Custom PDF Stamps using JavaScript | PDF.js Express SDK - Custom stamps](https://pdfjs.express/documentation/annotation/stamps#custom-stamps)
- [Import and export annotations using a database](https://pdfjs.express/documentation/annotation/import-export/database)
- [Create fillable forms - Modify fields to readonly](https://pdfjs.express/documentation/forms/fill-form-fields#modify-fields-to-readonly)

APIs:
- [Tools.TextUnderlineCreateTool - setEnableImmediateActionOnAnnotationSelection(enable)](https://pdfjs.express/api/Tools.TextUnderlineCreateTool.html#setEnableImmediateActionOnAnnotationSelection__anchor)
- [Tools.RubberStampCreateTool - setCustomDrawFunction(callback)](https://pdfjs.express/api/Tools.RubberStampCreateTool.html#setCustomDrawFunction__anchor)
- [Tools.SignatureCreateTool - saveSignatures(annotations)](https://pdfjs.express/api/Tools.SignatureCreateTool.html#saveSignatures__anchor)

Forums:
- [How to custom header](https://pdfjs.community/t/how-to-custom-header/840/1)
- [Annotations gets shuffled on Copy / paste](https://pdfjs.community/t/annotations-gets-shuffled-on-copy-paste/255/1)
- [How to remove Rubber stamp like Area & linear using annotation.popPath();](https://pdfjs.community/t/how-to-remove-rubber-stamp-like-area-linear-using-annotation-poppath/720/1)

---

<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:** [June 25, 2021, 3:14pm UTC](https://pdfjs.community/t/how-to-move-rubber-stamp-out-of-mis-tool-and-remove-another-group-annotation/844/3 "2021-06-25T15:14:00Z")

</div>

Hey there!

This code moves the rubber stamp into the main header:

```javascript
  // remove old toold
  instance.updateTool('AnnotationCreateRubberStamp', { buttonGroup: '' });

  // add new tool
  instance.setHeaderItems(header => {
    const items = header.getItems()
    header.get('freeHandToolGroupButton').insertBefore({
      type: 'toolButton',
      toolName: 'AnnotationCreateRubberStamp'
    })
    header.update(items);
  })

```

Thanks,  
Logan

---

<div class="post-metadata">

**Author:** ![tony](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/tony/32/427_2.png) [@tony](https://pdfjs.community/u/tony)\
**Post date:** [June 27, 2021, 1:32pm UTC](https://pdfjs.community/t/how-to-move-rubber-stamp-out-of-mis-tool-and-remove-another-group-annotation/844/4 "2021-06-27T13:32:54Z")

</div>

Thank you, i will try

---

<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:** [June 29, 2021, 2:27pm UTC](https://pdfjs.community/t/how-to-move-rubber-stamp-out-of-mis-tool-and-remove-another-group-annotation/844/5 "2021-06-29T14:27:40Z")

</div>


