XFINIUM.PDF Documentation
GetStringHeight(String,PdfFont,Double,Boolean) Method



String to measure.
Font used to draw the string.
Maximum width for wrapping.
True if long words are wrapped at character level if they do not fit entirely on a single line.
Gets the height of the string wrapped at the specified width.
Syntax
'Declaration
 
Public Overloads Shared Function GetStringHeight( _
   ByVal s As String, _
   ByVal font As PdfFont, _
   ByVal width As Double, _
   ByVal forceLongWordsWrap As Boolean _
) As Double
'Usage
 
Dim s As String
Dim font As PdfFont
Dim width As Double
Dim forceLongWordsWrap As Boolean
Dim value As Double
 
value = PdfTextEngine.GetStringHeight(s, font, width, forceLongWordsWrap)
public static double GetStringHeight( 
   string s,
   PdfFont font,
   double width,
   bool forceLongWordsWrap
)
public:
static double GetStringHeight( 
   String^ s,
   PdfFont^ font,
   double width,
   bool forceLongWordsWrap
) 

Parameters

s
String to measure.
font
Font used to draw the string.
width
Maximum width for wrapping.
forceLongWordsWrap
True if long words are wrapped at character level if they do not fit entirely on a single line.

Return Value

The total height of the text lines.
Requirements

Supported .NET Platforms: .NET 2.0 - .NET 4.6, Windows Forms, ASP.NET, Windows Presentation Foundation 4.x, Silverlight 5, WinRT, Universal Windows Platform, Windows Phone 8 & 8.1, Xamarin iOS & Android, Portable Class Library


Target Platforms:Windows 10, Windows 8.1, Windows 8 , Windows 7, Windows Vista SP1 or later, Windows Server 2008, Windows Server 2008 R2

See Also

Reference

PdfTextEngine Class
PdfTextEngine Members
Overload List

Send Feedback