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, y | x, y coordinates on the page you want to draw the text. |
| Text | Text to be draw. |
| FontDictionaryName | The name used to reference the font within the document Font Dictionary. The FontDictionaryName is assigned to the font when you call LoadFont. |
| FontSize | Font size to be used. |
| TextRenderMode | The text render mode (Fill, FillStroke or Stroke). |
| TextAlignment | Text 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. |
| StrokeColor | The text fill color. |
| FillColor | The text stroke (outline) color. |
| UnderLineColor | Color to use when underlining the text. |
| UnderLineHeight | Thickness of the underline. |
| Rotation | The 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)

'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)

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

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)
