ComponentOne PDF for .NET
MeasureString(String,Font,Single,StringFormat,Int32) Method

C1.C1Pdf.4 Assembly > C1.C1Pdf Namespace > C1PdfDocument Class > MeasureString Method : MeasureString(String,Font,Single,StringFormat,Int32) Method
String to measure.
System.Drawing.Font object that defines the appearance and size of the text.
Maximum width of the string.
A System.Drawing.StringFormat object that determines whether word wrapping is allowed.
Measures the specified string when drawn with the specified System.Drawing.Font object and formatted with the specified System.Drawing.StringFormat object.
Syntax
'Declaration
 
Public Overloads Function MeasureString( _
   ByVal text As System.String, _
   ByVal font As System.Drawing.Font, _
   ByVal width As System.Single, _
   ByVal sf As System.Drawing.StringFormat, _
   Optional ByVal firstChar As System.Integer _
) As System.Drawing.SizeF
public System.Drawing.SizeF MeasureString( 
   System.string text,
   System.Drawing.Font font,
   System.float width,
   System.Drawing.StringFormat sf,
   System.int firstChar
)

Parameters

text
String to measure.
font
System.Drawing.Font object that defines the appearance and size of the text.
width
Maximum width of the string.
sf
A System.Drawing.StringFormat object that determines whether word wrapping is allowed.
firstChar

Return Value

The size of the string expressed in points.
See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List