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

C1.C1Pdf.4 Assembly > C1.C1Pdf Namespace > C1PdfDocument Class > MeasureString Method : MeasureString(String,Font) Method
String to measure.
System.Drawing.Font object that defines the appearance and size of the text.
Measures the specified string when drawn with a given System.Drawing.Font object.
Syntax
'Declaration
 
Public Overloads Function MeasureString( _
   ByVal text As System.String, _
   ByVal font As System.Drawing.Font _
) As System.Drawing.SizeF
public System.Drawing.SizeF MeasureString( 
   System.string text,
   System.Drawing.Font font
)

Parameters

text
String to measure.
font
System.Drawing.Font object that defines the appearance and size of the text.

Return Value

The size of the string expressed in points.
Remarks
This overload returns the width and height of the string without wrapping. Unless the text parameter contains line break characters, the height returned corresponds to the font height.
See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List