All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfGraphics.MeasureString(String, Font, SizeF, PdfStringFormat, Single, Single, out Int32, out Int32) Method

Measures the string when it is drawn with the specific font and formatted with the given string format.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v21.1.Drawing.dll

Declaration

public SizeF MeasureString(
    string text,
    Font font,
    SizeF layoutSize,
    PdfStringFormat format,
    float dpiX,
    float dpiY,
    out int charactersFitted,
    out int linesFilled
)

Parameters

Name Type Description
text String

A string to measure.

font Font

The font that defines the string’s text format.

layoutSize SizeF

Specifies the maximum layout area for the text.

format PdfStringFormat

Provides formatting information (for example, alignment).

dpiX Single

The horizontal resolution (in dots per inch).

dpiY Single

The vertical resolution (in dots per inch).

charactersFitted Int32

The number of characters in the string.

linesFilled Int32

The number of lines in the string.

Returns

Type Description
SizeF

The string’s measured size.

See Also