Hi,
Is there a way to vertically center the text in a PdfFreeTextAnnotation. The border width increase inwards which overlaps with the markup text.
Here it is the code I'm using:
Spire.Pdf.Graphics.PdfFont font = font;
SizeF textSize = font.MeasureString("sample");
RectangleF rect = new RectangleF(x, y, textSize.Width, textSize.Height);
Spire.Pdf.Annotations.PdfFreeTextAnnotation textAnnotation = new Spire.Pdf.Annotations.PdfFreeTextAnnotation(rect);
textAnnotation.Text = "sample";
textAnnotation.Subject = subject;
textAnnotation.Font = font;
textAnnotation.Border = border;
textAnnotation.LineEndingStyle = Spire.Pdf.Annotations.PdfLineEndingStyle.None;
textAnnotation.Size = new SizeF(textSize.Width * 1.5F, textSize.Height * 1.5F);
textAnnotation.TextAlignment = Spire.Pdf.Annotations.PdfAnnotationTextAlignment.Center;
Thanks