Measures a string by using this font.
Namespace: Spire.Pdf.GraphicsAssembly: 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, SizeF layoutArea, PdfStringFormat format, out int charactersFitted, out int linesFilled )
Public Function MeasureString ( text As String, layoutArea As SizeF, format As PdfStringFormat, <OutAttribute> ByRef charactersFitted As Integer, <OutAttribute> ByRef linesFilled As Integer ) As SizeF
public: SizeF MeasureString( String^ text, SizeF layoutArea, PdfStringFormat^ format, [OutAttribute] int% charactersFitted, [OutAttribute] int% linesFilled )
member MeasureString : text : string * layoutArea : SizeF * format : PdfStringFormat * charactersFitted : int byref * linesFilled : int byref -> SizeF
Parameters
- text
- String
Text to be measured.
- layoutArea
- SizeF
SizeF structure that specifies the maximum layout area for the text 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.