With a FreeTextAnnotation, is it possible to determine if the text overflows the bounding rectangle?

with a FreeTextAnnotation, is it possible to determine if the text overflows the bounding rectangle?

Say I have a FreeTextAnnotation with a long string as the text and with a large font. If I have provided it a rectangle to bound it in, is there a way to determine if the text will overflow the rectangle? In other words, is there a way to help me decide if i need to reduce the font of the annotation text in order to make it all visible in the pdf?

thanks?

@PeteLee

Thanks for contacting support.

Would you kindly provide a sample code snippet with generated PDF document. We will test the scenario in our environment and address it accordingly.

aa68b681-c378-455c-a991-385ea768e7d0.pdf (69.0 KB)

Here is an example of a PDF that has a rectangle bounded FreeTextAnnotation which overflows the rectangle. As expected, the text that overflows is no longer visible in print view of the pdf. Is there a way in code to tell if the amount of text overflows the bounding rectangle?

Thanks!

@PeteLee

We regret to share that there is no such method or property in the API to determine whether text inside annotation overflows or not. However, would you kindly share the sample code snippet that you have used to add free text annotation in shared PDF. We will log an investigation ticket in our issue tracking system and share the ID with you.