' AddTextLine adds a single line of text to the current target page
' using the font and position specified, centred on the page
Sub AddTextCentered(Target As PDFjetPage, Font As PDFjetFont, Text As String, ypos As Float) 'ignore
Dim textline As PDFjetTextLine
textline.Initialize2(Font,Text)
Dim xpos As Float
Dim width As Float=textline.GetWidth
Dim pagewidth As Float=Target.GetWidth
xpos=(pagewidth/2)-(width/2)
textline.SetPosition(xpos,ypos)
textline.DrawOn(Target)
End Sub