ComponentOne PDF for .NET
C1.C1Pdf Namespace / C1PdfDocument Class / MeasureStringHtml Method / MeasureStringHtml(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.

In This Topic
    MeasureStringHtml(String,Font,Single) Method
    In This Topic
    Measures an HTML string when drawn with a given System.Drawing.Font object into a rectangle with the specified width.
    Syntax
    'Declaration
     
    
    Public Overloads Function MeasureStringHtml( _
       ByVal text As String, _
       ByVal font As Font, _
       ByVal width As Single _
    ) As SizeF
    public SizeF MeasureStringHtml( 
       string text,
       Font font,
       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 the text parameter contains an HTML string instead of plain text.

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

    See Also