Hi the code below is working fine, however, I would like a way to align the string centrally in the Rectangle, rather than using the "header.Left + 10" command
Many Thanks in advance,
String drawString = "1.Retail Manager, Assistant Manager, Team Leader, Colleagues 121's and Talent Pipeline";
PdfBrush solidBrush = new PdfSolidBrush(new PdfColor(51, 51, 255));
RectangleF header = new RectangleF(20, 30, 520, 20);
graphics.DrawRectangle(solidBrush, header);
PdfFont subHeadingFont = new PdfStandardFont(PdfFontFamily.TimesRoman, 14);
PdfTextElement element = new PdfTextElement(drawString,subHeadingFont);
element.Brush = PdfBrushes.White;
element.Draw(page2, new PointF(header.Left + 10, header.Top + 2));