TextPadding property for PdfFreeTextAnnotations do not seem to have an affect.

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Moderator: Alex

Post Reply
IntegraHarlan
Posts: 65
Joined: Fri Jan 24, 2020 3:37 am

TextPadding property for PdfFreeTextAnnotations do not seem to have an affect.

Post by IntegraHarlan »

Hi,
When I apply text Padding to a PdfFreeTextAnnotation, I do not see the padding affect.
I tried it on your demo project for PdfFreeTextAnnotations and I do not see the padding affect in the demo project.
I set the padding before the annotation is built.

textAnnotation.TextPadding = new PaddingF(10, 10, 10, 10);

The TextPadding property shows the padding I added, but I do not see the padding on the annotation when I add text to it.

Is there some other property that needs to be set for this to work?

Thanks
Harlan
Alex
Site Admin
Posts: 1942
Joined: Thu Jul 10, 2008 2:21 pm

Re: TextPadding property for PdfFreeTextAnnotations do not seem to have an affect.

Post by Alex »

Hi Harlan,

The PdfFreeTextAnnotation.TextPadding property gets or sets the padding, in default user space, of text rectangle in PDF annotation rectangle.

Best regards, Alexander
IntegraHarlan
Posts: 65
Joined: Fri Jan 24, 2020 3:37 am

Re: TextPadding property for PdfFreeTextAnnotations do not seem to have an affect.

Post by IntegraHarlan »

Hi Alexander,

So the TextPadding property pads that annotation rectangle, and not the text?
I am trying to add text padding so there is more separation of the text from the annotation border.
Is there a way to do this?

Thanks
Harlan
Alex
Site Admin
Posts: 1942
Joined: Thu Jul 10, 2008 2:21 pm

Re: TextPadding property for PdfFreeTextAnnotations do not seem to have an affect.

Post by Alex »

Hi Harlan,

PDF specification does not allow to specify padding for text in text annotation.

If your application needs to view annotation and does not need to edit annotation, you can do the following:
Annotation editing in Adobe or other PDF viewers will work not correctly because PDF specification does not allow to specify padding for text in text annotation.

Best regards, Alexander
Post Reply