# How to create TextHighllight same as default TextHighllight Annotation

**URL:** <https://pdfjs.community/t/how-to-create-texthighllight-same-as-default-texthighllight-annotation/1752>\
**Category:** Technical Support\
**Created:** [June 8, 2022, 3:34am UTC](https://pdfjs.community/t/how-to-create-texthighllight-same-as-default-texthighllight-annotation/1752 "2022-06-08T03:34:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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 8, 2022, 3:34am UTC](https://pdfjs.community/t/how-to-create-texthighllight-same-as-default-texthighllight-annotation/1752/3 "2022-06-08T03:34:38Z")

</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)
- [Create rectangle annotations in PDF.js Express - Other examples](https://pdfjs.express/documentation/annotation/create-annotation-rectangle#other-examples)
- [Create highlight annotations in PDF.js Express](https://pdfjs.express/documentation/annotation/create-annotation-highlight)

APIs:
- [Annotations.TextHighlightAnnotation - getRectPadding()](https://pdfjs.express/api/7.0/Annotations.TextHighlightAnnotation.html#getRectPadding__anchor)
- [TextHighlightAnnotation - new TextHighlightAnnotation()](https://pdfjs.express/api/TextHighlightAnnotation.html#TextHighlightAnnotation__anchor)
- [Core.Annotations.CustomAnnotation - new CustomAnnotation(type [, initializer])](https://pdfjs.express/api/Core.Annotations.CustomAnnotation.html#CustomAnnotation__anchor)

Forums:
- [How to set value of “trn-custom-data” for creating highlight annotations?](https://pdfjs.community/t/how-to-set-value-of-trn-custom-data-for-creating-highlight-annotations/1695/5)
- [Programmatically highlight text upon searching](https://pdfjs.community/t/programmatically-highlight-text-upon-searching/71/2)
- [Using Free text tool programatically](https://pdfjs.community/t/using-free-text-tool-programatically/126/2)

---

_[View the full topic](https://pdfjs.community/t/how-to-create-texthighllight-same-as-default-texthighllight-annotation/1752)._
