Hello, I want the text I put in the freetext annotations to be synamically sized to adapt to the annotation box size.
I fount a function called switchToAutoFontSize() in the API documentation under FreeTextAnnotation.
But the problem is it does not work, rather it hampers other methods and member of the class. For example settinf the fill colour of the annotation fails.
i am using the code as given below, which is exactly similar to the code given in the documentation.
Thank you for replying.
It is still not working for me.
I noticed the error “TypeError: annot.switchToAutoFontSize is not a function” in the browser console.
That indicates that the annotList that you are getting does not contain free-texts, do you have a sample PDF that you are loading? Does the PDF I provided above work for you?
I did a mistake, I forgot to copy the static files to public/web-viewer in the react app.
Apologies for this silly mistake. But I think it’s weird when we do have the node_modules.