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

C1.C1Pdf.4 Assembly > C1.C1Pdf Namespace > C1PdfDocument Class > DrawString Method : DrawString(String,Font,Color,RectangleF) Method
String to draw.
System.Drawing.Font object that defines the appearance and size of the drawn text.
The color of the drawn text.
The rectangle structure that specifies the location of the drawn text, in points from the top left corner of the page.
Draws the specified text string in the specified rectangle with the specified System.Drawing.Brush and System.Drawing.Font objects.
Syntax
'Declaration
 
Public Overloads Function DrawString( _
   ByVal text As System.String, _
   ByVal font As System.Drawing.Font, _
   ByVal color As System.Drawing.Color, _
   ByVal rc As System.Drawing.RectangleF _
) As System.Integer
public System.int DrawString( 
   System.string text,
   System.Drawing.Font font,
   System.Drawing.Color color,
   System.Drawing.RectangleF rc
)

Parameters

text
String to draw.
font
System.Drawing.Font object that defines the appearance and size of the drawn text.
color
The color of the drawn text.
rc
The rectangle structure that specifies the location of the drawn text, in points from the top left corner of the page.

Return Value

The index of first character that was not printed because it did not fit in the specified rectangle.
Remarks
This overload renders strings aligned to the top left corner of the specified rectangle, wrapping text as needed within the rectangle, without clipping, and in the horizontal direction. To change any of these defaults, use the overload that allows you to specify a System.Drawing.StringFormat parameter.
See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List