How to auto resize freetext textbox

Is there any way to auto resize the textbox to fit the content?
image

Hello, I’m Ron, an automated tech support bot :robot:

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

Guides:APIs:Forums:

Hello lakshan,

The FreeTextAnnotation has properties for auto-sizing:

AutoSizeTypes:
NONE	string	Freetext stays at fixed size
AUTO	string	Autosize to content
FIXED_WIDTH	string	Width cannot be changed
FIXED_HEIGHT	string	Height cannot be changed

https://pdfjs.express/api/Core.Annotations.FreeTextAnnotation.html

Does this work for you?

Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron

Set that property but it’s not working

Not resized, some texts are missing

Hello lakshan,

This is how you use the API:

freeTextAnnotation.setAutoSizeType(instance.Core.Annotations.FreeTextAnnotation.AutoSizeTypes.AUTO)

Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron