Page 1 of 1

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

Posted: Thu Jul 02, 2020 4:36 am
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

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

Posted: Thu Jul 02, 2020 12:48 pm
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

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

Posted: Thu Jul 02, 2020 10:11 pm
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

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

Posted: Mon Jul 06, 2020 4:49 pm
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