[]
        
(Showing Draft Content)

C1.C1Pdf.C1PdfDocument.MeasureStringHtml

MeasureStringHtml Method

MeasureStringHtml(string, Font, float)

Measures an HTML string when drawn with a given Font object into a rectangle with the specified width.

Declaration
public SizeF MeasureStringHtml(string text, Font font, float width)
Parameters
Type Name Description
string text

String to measure.

Font font

Font object that defines the appearance and size of the text.

float width

Maximum width of the string.

Returns
Type Description
SizeF

The size of the string expressed in points.

Remarks

This method is similar to MeasureString(string, Font, float), except the text parameter contains an HTML string instead of plain text.

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

MeasureStringHtml(string, Font)

Measures an HTML string when drawn with a given Font object.

Declaration
public SizeF MeasureStringHtml(string text, Font font)
Parameters
Type Name Description
string text

String to measure.

Font font

Font object that defines the appearance and size of the text.

Returns
Type Description
SizeF

The size of the string expressed in points.