.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfGraphics.MeasureString Method

Name Parameters Description
MeasureString(String, Font) text, font Measures the specified string when drawn with the specified Font.
MeasureString(String, Font, PdfStringFormat) text, font, format Measures the specified string when drawn with the specified Font and formatted with the specified PdfStringFormat.
MeasureString(String, Font, PdfStringFormat, Single, Single) text, font, format, dpiX, dpiY Measures the specified string when drawn with the specified Font, horizontal and vertical resolutions and format.
MeasureString(String, Font, SizeF) text, font, layoutSize Measures the specified string when drawn with the specified Font and text layout size.
MeasureString(String, Font, SizeF, PdfStringFormat) text, font, layoutSize, format Measures the specified string when drawn with the specified Font, text layout size, and format.
MeasureString(String, Font, SizeF, PdfStringFormat, Single, Single) text, font, layoutSize, format, dpiX, dpiY Measures the specified string when drawn with the specified Font, text layout size, horizontal and vertical resolutions, and format.
MeasureString(String, Font, SizeF, PdfStringFormat, Single, Single, out Int32, out Int32) text, font, layoutSize, format, dpiX, dpiY, charactersFitted, linesFilled Measures the string when it is drawn with the specific font and formatted with the given string format.