# Is there a way to exclude a type of annotation from history

**URL:** <https://pdfjs.community/t/is-there-a-way-to-exclude-a-type-of-annotation-from-history/1848>\
**Category:** Technical Support\
**Created:** [July 10, 2022, 7:28am UTC](https://pdfjs.community/t/is-there-a-way-to-exclude-a-type-of-annotation-from-history/1848 "2022-07-10T07:28:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lakshan](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@lakshan](https://pdfjs.community/u/lakshan)\
**Post date:** [July 10, 2022, 7:28am UTC](https://pdfjs.community/t/is-there-a-way-to-exclude-a-type-of-annotation-from-history/1848/1 "2022-07-10T07:28:49Z")

</div>

In my application, I programmatically generate a text annotation at the bottom of every annotation. Is there anyways to exclude it from annotation history. I don’t want that text to be changed when user click on undo

---

<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:** [July 10, 2022, 7:28am UTC](https://pdfjs.community/t/is-there-a-way-to-exclude-a-type-of-annotation-from-history/1848/3 "2022-07-10T07:28:54Z")

</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 annotations - Programmatically](https://pdfjs.express/documentation/annotation/create-annotations#programmatically)
- [Annotation permissions - Default behavior](https://pdfjs.express/documentation/annotation/annotation-permissions#default-behavior)
- [Annotation History](https://pdfjs.express/documentation/annotation/history)

APIs:
- [Core](https://pdfjs.express/api/Core.html#__anchor)
- [Core.Tools.StampCreateTool - mouseLeftUp(e)](https://pdfjs.express/api/Core.Tools.StampCreateTool.html#mouseLeftUp__anchor)
- [UI.NotesPanel - enableTextCollapse()](https://pdfjs.express/api/UI.NotesPanel.html#.enableTextCollapse__anchor)

Forums:
- [How to add confirmation pop up before deleting any annotation?](https://pdfjs.community/t/how-to-add-confirmation-pop-up-before-deleting-any-annotation/1291/1)
- [Annotation seems to be doubling or Creating a weird bold when doing a download externally](https://pdfjs.community/t/annotation-seems-to-be-doubling-or-creating-a-weird-bold-when-doing-a-download-externally/947/1)
- [How to Pan while tracing by pressing and holding the left click of the mouse](https://pdfjs.community/t/how-to-pan-while-tracing-by-pressing-and-holding-the-left-click-of-the-mouse/531/1)

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [July 12, 2022, 7:35pm UTC](https://pdfjs.community/t/is-there-a-way-to-exclude-a-type-of-annotation-from-history/1848/4 "2022-07-12T19:35:18Z")

</div>

Hello lakshan,

Currently we dont have a standardized way to do this, however here are the links to the documentation on the AnnotationHistoryManager:

- [Annotation History | Documentation](https://pdfjs.express/documentation/annotation/history)
- [PDFJS Express WebViewer Class: AnnotationHistoryManager](https://pdfjs.express/api/Core.AnnotationHistoryManager.html)

We have a task in our next sprint’s backlog to create better APIs to interact with the annotation history manager.

Best regards,  
Tyler Gordon  
Web Development Support Engineer  
PDFTron
