PdfFontBase
MeasureString Method (String, Single, PdfStringFormat)
|
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,
float width,
PdfStringFormat format
)
Public Function MeasureString (
text As String,
width As Single,
format As PdfStringFormat
) As SizeF
public:
SizeF MeasureString(
String^ text,
float width,
PdfStringFormat^ format
)
member MeasureString :
text : string *
width : float32 *
format : PdfStringFormat -> SizeF
Parameters
-
text
-
Type:
System
String
Text to be measured.
-
width
-
Type:
System
Single
Maximum width of the string in points.
-
format
-
Type:
Spire.Pdf.Graphics
PdfStringFormat
PdfStringFormat that represents formatting information, such as line spacing, for the string.
Return Value
Type:
SizeF
Size of the text.
See Also