Click or drag to resize

PdfFontBase MeasureString Method (String, PdfStringFormat, Int32 , Int32 )

Measures a string by using this font.

Namespace: Spire.Pdf.Graphics
Assembly: Spire.Pdf (in Spire.Pdf.dll) Version: 11.3.7.0 (11.3.7.1046)
Syntax
public SizeF MeasureString(
	string text,
	PdfStringFormat format,
	out int charactersFitted,
	out int linesFilled
)

Parameters

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

Return Value

Type: SizeF
Size of the text.
See Also