VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.Pdf.Drawing Namespace / PdfGraphics Class / DrawString Methods / DrawString(String,PdfFont,Single,PdfBrush,RectangleF,PdfContentAlignment,Boolean) Method
Syntax Remarks Requirements SeeAlso
In This Topic
DrawString(String,PdfFont,Single,PdfBrush,RectangleF,PdfContentAlignment,Boolean) Method (PdfGraphics)
In This Topic
Draws the specified text string on the specified rectangle.
Syntax
'Declaration

Public Overloads Sub DrawString( _
ByVal s
String to draw.
As System.String, _
ByVal font
PdfFont that defines the text format of the string.
As Vintasoft.Imaging.Pdf.Tree.Fonts.PdfFont, _
ByVal fontSize
Font size.
As Single, _
ByVal brush
A PdfBrush that determines the color of the drawn text.
As PdfBrush, _
ByVal rect
A System.Drawing.RectangleF structure that specifies the location of the drawn text.
As System.Drawing.RectangleF, _
ByVal textAlignment
Text alignment.
As PdfContentAlignment, _
ByVal wordWrap
A value indicating whether to enable automatic word wrap to the beginning of the next line when necessary.
As Boolean _
)

Parameters

s
String to draw.
font
PdfFont that defines the text format of the string.
fontSize
Font size.
brush
A PdfBrush that determines the color of the drawn text.
rect
A System.Drawing.RectangleF structure that specifies the location of the drawn text.
textAlignment
Text alignment.
wordWrap
A value indicating whether to enable automatic word wrap to the beginning of the next line when necessary.
Remarks

This method does NOT ignore carriage returns and new line characters.

Use overloaded method that takes point that specifies location, instead of rectangle, if carriage returns and new line characters should be ignored.

Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also