Skip to content

PdfTextEngine.GetStringInBox Method

Overloads

Name Description
GetStringInBox(String,PdfFont,Double,Double) Gets the string that fits in the given box.
GetStringInBox(String,PdfFont,Double,Double,Boolean) Gets the string that fits in the given box.
GetStringInBox(String,PdfFont,PdfStringLayoutOptions) Gets the string that fits in the given box.

GetStringInBox(String,PdfFont,Double,Double)

Gets the string that fits in the given box.

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

Parameters

s String

String to wrap in the box.

font PdfFont

Font used to draw the string.

width Double

The box width.

height Double

The box height.

GetStringInBox(String,PdfFont,Double,Double,Boolean)

Gets the string that fits in the given box.

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

Parameters

s String

String to wrap in the box.

font PdfFont

Font used to draw the string.

width Double

The box width.

height Double

The box height.

forceLongWordsWrap Boolean

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

GetStringInBox(String,PdfFont,PdfStringLayoutOptions)

Gets the string that fits in the given box.

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

Parameters

s String

String to wrap in the box.

font PdfFont

Font used to draw the string.

slo PdfStringLayoutOptions

Layout options that affect the string