FreeText annotation with a small font and a large border thickness

I have a FreeText annotation with a small font (10) and a large border thickness (50). What I am seeing is the border thickness overlaps and covers the text, the resulting pdf looks like it has an empty rectangle with no text.

FreeText annotations with larger fonts and smaller borders appear correctly.

I have tried to set the font size after the border thickness, I have also tried SetPadding and SetContentRect – but both of these methods appear to change the original rectangle. The resulting pdf has the rectangle in the incorrect location.

Can you offer any guidance on how to correctly position the text when the border increases in size?

Hi, I took a look at the code, and I eased the restriction on when it would not show text at all. This will be available in the developer channel tonight, but for mobile/release will take longer.
http://www.pdftron.com/nightly/?p=experimental/

That being said, there will always be a border size that is too large, to allow for text to appear fully, or at all.

Can you offer any guidance on how to correctly position the text when the border increases in size?

After calling setting the font size, and border thickness, you would just call RefreshAppearance, and we internally reflow the text to fit inside.

Also, if you set font size to zero, then RefreshAppearance will resize the font for you also.

Ryan, thank you for looking into this. I’m not entirely sure what changed, I grabbed the nightly build and replaced my dll, but I am seeing the following behavior in both builds.

What I should see is something very close to this:

What I see in my output is this:

I had to almost double the width of the rectangle in order to get the text to appear:

I tried calling RefreshAppearance both before and after the annotation was pushed to the page. The results are the same as not calling RefreshAppearance.

Any other ideas on what I could be missing, or is this an issue within the annotation itself?

Thank you!

I would call PDFNet.GetVersion just to confirm you are actually running the latest version. I am not sure what your setup is (which you can explain if you like… C#?). My change was in 29181,so you should see something like 6.4029181 , or higher after calling GetVersion.

If that doesn’t help, could you send the PDF file, with the problem annotation on it, to support?
https://www.pdftron.com/support/reportproblem.html

Good call - I was not running the correct version. After restarting visual studio (C#) it was finally attempting to load the correct dll, however I’m now getting an exception when trying to initialize. Not sure why yet.

I am able to swap out my dll with the current dll downloaded from the website and that returns me the updated version.

I will report my findings once I get this running with the nightly dll.

Thank you again.

Ryan,

Using the experimental build, version 6.5029207, I can see your change has fixed the size. However calling RefreshAppearance does not seem to reflow the text properly.

Is this something that I should send to support?