#  update the font-size   during resizing the free hand text box to make the text always full fill the whole box

**URL:** <https://pdfjs.community/t/update-the-font-size-during-resizing-the-free-hand-text-box-to-make-the-text-always-full-fill-the-whole-box/136>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [July 14, 2020, 4:36pm UTC](https://pdfjs.community/t/update-the-font-size-during-resizing-the-free-hand-text-box-to-make-the-text-always-full-fill-the-whole-box/136 "2020-07-14T16:36:12Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![a.sun](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@a.sun](https://pdfjs.community/u/a.sun)\
**Post date:** [July 14, 2020, 4:36pm UTC](https://pdfjs.community/t/update-the-font-size-during-resizing-the-free-hand-text-box-to-make-the-text-always-full-fill-the-whole-box/136/1 "2020-07-14T16:36:12Z")

</div>

**Detailed description of issue**

Currently we try to add a small feature which can update the font-size during resizing the free hand text box to make the text always full fill the whole box. But I did not find the right API to do this, I tied to extend moseMove handler of AnnotationSelectTool. But there are several problems:

1. I cant detect is this a resizing or relocating of box.
2. I cant detect the resize direction (right or left, top or bottom)
3. The initial text box is not big enough to show all text.  
**Expected behaviour**  
update the font-size during resizing the free hand text box to make the text always full fill the whole box  
**Link to document**  
{Provide a link to the document in question if possible}

**Code snippet**  
{Provide a relevant code snippet}

---

_[View the full topic](https://pdfjs.community/t/update-the-font-size-during-resizing-the-free-hand-text-box-to-make-the-text-always-full-fill-the-whole-box/136)._
