Measures a string by using this font.

Namespace: Spire.Pdf.Graphics
Assembly: Spire.Pdf (in Spire.Pdf.dll) Version: 6.2.6.0 (6.2.6.2020)

Syntax

            
 C#  Visual Basic  Visual C++  F# 
public SizeF MeasureString(
	string text,
	PdfStringFormat format,
	out int charactersFitted,
	out int linesFilled
)
Public Function MeasureString ( 
	text As String,
	format As PdfStringFormat,
	<OutAttribute> ByRef charactersFitted As Integer,
	<OutAttribute> ByRef linesFilled As Integer
) As SizeF
public:
SizeF MeasureString(
	String^ text, 
	PdfStringFormat^ format, 
	[OutAttribute] int% charactersFitted, 
	[OutAttribute] int% linesFilled
)
member MeasureString : 
        text : string * 
        format : PdfStringFormat * 
        charactersFitted : int byref * 
        linesFilled : int byref -> SizeF 

Parameters

text
String
Text to be measured.
format
PdfStringFormat
PdfStringFormat that represents formatting information, such as line spacing, for the string.
charactersFitted
Int32%
Number of characters in the string.
linesFilled
Int32%
Number of text lines in the string.

Return Value

SizeF
Size of the text.

See Also