ComponentOne PDF for .NET
DrawString(String,Font,Color,PointF,StringFormat) Method

C1.C1Pdf.4 Assembly > C1.C1Pdf Namespace > C1PdfDocument Class > DrawString Method : DrawString(String,Font,Color,PointF,StringFormat) Method
String to draw.
System.Drawing.Font object that defines the appearance and size of the drawn text.
The object that defines the color of the drawn text.
The point structure that specifies the location of the drawn text, in points
System.Drawing.StringFormat object that specifies formatting attributes applied to the drawn text.
Draws the specified text string at the specified point with the specified System.Drawing.Brush and System.Drawing.Font objects using the formatting attributes of the specified System.Drawing.StringFormat object.
Syntax
'Declaration
 
Public Overloads Function DrawString( _
   ByVal text As System.String, _
   ByVal font As System.Drawing.Font, _
   ByVal color As System.Drawing.Color, _
   ByVal pt As System.Drawing.PointF, _
   ByVal sf As System.Drawing.StringFormat _
) As System.Integer
public System.int DrawString( 
   System.string text,
   System.Drawing.Font font,
   System.Drawing.Color color,
   System.Drawing.PointF pt,
   System.Drawing.StringFormat sf
)

Parameters

text
String to draw.
font
System.Drawing.Font object that defines the appearance and size of the drawn text.
color
The object that defines the color of the drawn text.
pt
The point structure that specifies the location of the drawn text, in points
sf
System.Drawing.StringFormat object that specifies formatting attributes applied to the drawn text.

Return Value

The index of first character that was not printed because it did not fit in the specified rectangle.
See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List