FreeText annotation with a small font and a large border thickness

108 views
Skip to first unread message

Michael

unread,
Jan 21, 2015, 1:35:58 PM1/21/15
to pdfne...@googlegroups.com
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?

Ryan

unread,
Jan 21, 2015, 4:13:20 PM1/21/15
to pdfne...@googlegroups.com
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.

Michael

unread,
Jan 22, 2015, 1:09:36 PM1/22/15
to pdfne...@googlegroups.com

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!

Ryan

unread,
Jan 22, 2015, 1:47:34 PM1/22/15
to pdfne...@googlegroups.com
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

Michael

unread,
Jan 22, 2015, 2:58:17 PM1/22/15
to pdfne...@googlegroups.com
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.

Michael

unread,
Jan 22, 2015, 4:14:32 PM1/22/15
to pdfne...@googlegroups.com
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?


On Thursday, January 22, 2015 at 1:47:34 PM UTC-5, Ryan wrote:
Reply all
Reply to author
Forward
0 new messages