ComponentOne PDF for .NET
MeasureStringRtf(String,Font,Single) Method

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

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.

Return Value

The size of the string expressed in points.
Remarks

This method is similar to MeasureString(String,Font,Single), except it recognizes Rtf (Rich Text Format) strings like those used in the RichTextBox control.

For details, see the DrawStringRtf(String,Font,Brush,RectangleF) method.

See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List