Regarding Text Positioning in PDF

I am using a C# application and I need to add someone’s name to a certificate. As shown in the attached screen shot, I want to insert the name of certificate recipient right at the center between line 1: “This is to certify that” and line 2: “has successfully met the requirements for”.

Let’s say my font is Times New Roman, size 24. How do I calculate the distance between the 2 lines of text mentioned above and place the name “Andrew John Sanderson” exactly at the center with equal spacing between line 1 and line 2

I did look through the forum but couldn’t find any previous questions/answers to something similar, so if someone can please let me know how I can do this, I’d greatly appreciate it :=)

Thank you so much.
Sonny K

Hi Sonny,

You’ll need to use the “Reading additional information about a text” example to get the positions of those two lines:

Then you can use the “Text alignment and positioning” example to position text between them:

I hope this helps.
If you need anything else, please send us your PDF file.


Hi Mario,

Thank you very much for pointing me in the right direction. I will go through the links you gave and will ask if I have any other question.