# Freetext Annotation Text padding

**URL:** <https://pdfjs.community/t/freetext-annotation-text-padding/315>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [October 6, 2020, 6:13am UTC](https://pdfjs.community/t/freetext-annotation-text-padding/315 "2020-10-06T06:13:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 7, 2020, 2:37pm UTC](https://pdfjs.community/t/freetext-annotation-text-padding/315/2 "2020-10-07T14:37:57Z")

</div>

Hi!

You can change the values in ‘setPadding’ to add padding to the top.

```javascript
newAnnot.setPadding(new Annotations.Rect(0, 0, 0, 50));

```

You’ll have to increase the height of the annotation as well.

We have some small improvements coming to the freetext annotation in the next patch so this may help with the text getting cut off as well.

Thanks!  
Logan

---

_[View the full topic](https://pdfjs.community/t/freetext-annotation-text-padding/315)._
