DrawRenderText

Draws render text at the specifiy location, using the given font, size, alignment and color.

DrawRenderText(x As Single, y As Single, Text As String, FontDictionaryName As String, FontSize As Single,
               TextAlignment As pdf.TextAlignment, TextRenderMode As pdf.TextRenderingMode,
               StrokeColor As Color, FillColor As Color)

DrawRenderText(x As Single, y As Single, Text As String, FontDictionaryName As String, FontSize As Single,
               TextAlignment As pdf.TextAlignment, TextRenderMode As pdf.TextRenderingMode,
               StrokeColor As Color, FillColor As Color, UnderLineColor As Color,
               UnderLineHeight As Single)

DrawRenderText(x As Single, y As Single, Text As String, FontDictionaryName As String, FontSize As Single,
               TextRenderMode As pdf.TextRenderingMode, StrokeColor As Color, FillColor As Color,
               Rotation As Single)

DrawRenderText(x As Single, y As Single, Text As String, FontDictionaryName As String, FontSize As Single,
               TextRenderMode As pdf.TextRenderingMode, StrokeColor As Color, FillColor As Color,
               UnderLineColor As Color, UnderLineHeight As Single, Rotation As Single)

Depending on the version of DrawRenderText you call, the following parameters are available:

x, yx, y coordinates on the page you want to draw the text.
TextText to be draw.
FontDictionaryNameThe name used to reference the font within the document Font Dictionary. The FontDictionaryName is assigned to the font when you call LoadFont.
FontSizeFont size to be used.
TextRenderModeThe text render mode (Fill, FillStroke or Stroke).
TextAlignmentText alignment (Center, Left or Right). This option is not available when you rotate text.

If the text alignment is left, it is the text beginning position. If the alignment is right, its the ending position. If the alignment is center, its the middle position.
StrokeColorThe text fill color.
FillColorThe text stroke (outline) color.
UnderLineColorColor to use when underlining the text.
UnderLineHeightThickness of the underline.
RotationThe degrees the text is to be rotated in a counter-clockwise direction.

Examples

'Because the following DrawRenderText calls are using pdf.TextRendering.Stroke as the render mode,
'the fill color of yellow is not used. You still must pass a valid fill color.

DrawRenderText(1, 6, "Stroked brown", "ArialBold", 50, pdf.TextAlignment.Left, pdf.TextRenderingMode.Stroke,
               Color.Brown, Color.Yellow)

Stroked text example

'Because the following DrawRenderText call is using pdf.TextRendering.Fill as the render mode, the stroke
'color of brown is not used. You still must pass a valid stroke color.

DrawRenderText(1, 5, "Filled green", "ArialBold", 50, pdf.TextAlignment.Left, pdf.TextRenderingMode.Fill,
               Color.Red, Color.Green)

Filled text example

DrawRenderText(1, 4, "Stroked red, filled green", "ArialBold", 50, pdf.TextAlignment.Left,
               pdf.TextRenderingMode.FillStroke, Color.Red, Color.Green)

Stroked Filled text example

DrawRenderText(1, 3, "This text is stroked green, filled red, Underline in blue", "ArialBold", 30, pdf.TextAlignment.Center, pdf.TextRenderingMode.FillStroke, Color.Green, Color.Red, Color.Blue, 0.02)

Stroked Filled Underline text example