Measures a string by using this font.
Namespace: Spire.Pdf.GraphicsAssembly: Spire.Pdf (in Spire.Pdf.dll) Version: 7.9.2.0 (7.9.2.1020)
Syntax
| C# | Visual Basic | Visual C++ | F# |
public SizeF MeasureString( string text, float width, PdfStringFormat format, out int charactersFitted, out int linesFilled )
Public Function MeasureString ( text As String, width As Single, format As PdfStringFormat, <OutAttribute> ByRef charactersFitted As Integer, <OutAttribute> ByRef linesFilled As Integer ) As SizeF
public: SizeF MeasureString( String^ text, float width, PdfStringFormat^ format, [OutAttribute] int% charactersFitted, [OutAttribute] int% linesFilled )
member MeasureString : text : string * width : float32 * format : PdfStringFormat * charactersFitted : int byref * linesFilled : int byref -> SizeF
Parameters
- text
- String
Text to be measured.
- width
- Single
Maximum width of the string in points.
- 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
SizeFSize of the text.