Detailed description of issue
I am trying to add free text annotations programmatically to the pdf. I have to supply a fixed height and width to the annotation in order to render it, but sometimes the content is larger than the width, in that case I want the width to be increased or expand automatically as per length of the content.
Please see the example attached. Here the text got wrapped, but ideally, it should be in one line.
Things I tried
I tried to use the following code,
freeText.setAutoSizeType(instance.Core.Annotations.FreeTextAnnotation.setAutoSizeType.AUTO); but its not working. The annotation got disappeared as soon as I put this code.
Can you please provide working code as an example ?
Expected behaviour
Expected behaviour is to auto expand the free text annotation by increasing the width to show contents in single line.
Does your issue happen with every document, or just one?
Every doc
But the question is still there. While rendering a freetext annotation through code, how to make sure that the contents fits in one line as per the length of the contents.
Could you please try refreshing the page after making the changes to the code?
Sometimes react has an issue with rerendering the viewer instance on the same html element on a hot reload.