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

C1.C1Pdf.4 Assembly > C1.C1Pdf Namespace > C1PdfDocument Class > DrawString Method : DrawString(String,Font,Color,RectangleF,Int32,StringFormat,Single) Method
The string to draw.
The System.Drawing.Font used to draw the text.
The text color.
The rectangle specifying the location of the text, in points from the top left corner of the page.
The index of the first character that will be rendered.
The System.Drawing.StringFormat object specifying the formatting attributes applied to the text.
The width coefficient applied to characters. The default is 1.0, use 2.0 for double width and so on.
Draws the specified text string in the specified rectangle, with the specified System.Drawing.Brush and System.Drawing.Font, using the formatting attributes of the specified System.Drawing.StringFormat object and specified character width coefficient.
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, _
   ByVal firstChar As System.Integer, _
   ByVal sf As System.Drawing.StringFormat, _
   ByVal widthCoeff As System.Single _
) As System.Integer
public System.int DrawString( 
   System.string text,
   System.Drawing.Font font,
   System.Drawing.Color color,
   System.Drawing.RectangleF rc,
   System.int firstChar,
   System.Drawing.StringFormat sf,
   System.float widthCoeff
)

Parameters

text
The string to draw.
font
The System.Drawing.Font used to draw the text.
color
The text color.
rc
The rectangle specifying the location of the text, in points from the top left corner of the page.
firstChar
The index of the first character that will be rendered.
sf
The System.Drawing.StringFormat object specifying the formatting attributes applied to the text.
widthCoeff
The width coefficient applied to characters. The default is 1.0, use 2.0 for double width and so on.

Return Value

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

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List