Skip to content

PdfTextEngine.GetStringHeight Method

Overloads

Name Description
GetStringHeight(String,PdfFont,Double) Gets the height of the string wrapped at the specified width.
GetStringHeight(String,PdfFont,Double,Boolean) Gets the height of the string wrapped at the specified width.
GetStringHeight(String,PdfFont,PdfStringLayoutOptions) Gets the height of the string wrapped at the specified width.

GetStringHeight(String,PdfFont,Double)

Gets the height of the string wrapped at the specified width.

C#
public static double GetStringHeight(string s, PdfFont font, double width)

Parameters

s String

String to measure.

font PdfFont

Font used to draw the string.

width Double

Maximum width for wrapping.

GetStringHeight(String,PdfFont,Double,Boolean)

Gets the height of the string wrapped at the specified width.

C#
public static double GetStringHeight(string s, PdfFont font, double width, bool forceLongWordsWrap)

Parameters

s String

String to measure.

font PdfFont

Font used to draw the string.

width Double

Maximum width for wrapping.

forceLongWordsWrap Boolean

True if long words are wrapped at character level if they do not fit entirely on a single line.

GetStringHeight(String,PdfFont,PdfStringLayoutOptions)

Gets the height of the string wrapped at the specified width.

C#
public static double GetStringHeight(string s, PdfFont font, PdfStringLayoutOptions slo)

Parameters

s String

String to measure.

font PdfFont

Font used to draw the string.

slo PdfStringLayoutOptions

Layout options that affect the string