VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging.Pdf.Drawing Namespace / PdfGraphics Class / MeasureString Methods / MeasureString(String,PdfFont,Single,Single,Boolean,Single,Single,Single) Method
Syntax Requirements SeeAlso
In This Topic
    MeasureString(String,PdfFont,Single,Single,Boolean,Single,Single,Single) Method (PdfGraphics)
    In This Topic
    Measures the specified string when drawn with the specified PdfFont.
    Syntax
    'Declaration
    
    Public Overloads Sub MeasureString( _
    ByVal text
    String to measure.
    As System.String, _
    ByVal font
    PdfFont that defines the text format of the string.
    As Vintasoft.Imaging.Pdf.Tree.Fonts.PdfFont, _
    ByVal height
    Text string height.
    As Single, _
    ByVal maxWidth
    Maximum width of text string.
    As Single, _
    ByVal width
    Text string width.
    As Boolean, _
    ByVal fontSize
    Font size.
    As Single, _
    ByRef wordWrap
    A value indicating whether to enable automatic word wrap to the beginning of the next line when necessary.
    As Single, _
    ByRef lineSpacing
    Line spacing.
    As Single _
    )
    public: void MeasureString(
    System.String text,
    Vintasoft.Imaging.Pdf.Tree.Fonts.PdfFont* font,
    float height,
    float maxWidth,
    bool width,
    float fontSize,
    [PARAMFLAG::Out] float wordWrap,
    [PARAMFLAG::Out] float lineSpacing
    )

    Parameters

    text
    String to measure.
    font
    PdfFont that defines the text format of the string.
    height
    Text string height.
    maxWidth
    Maximum width of text string.
    width
    Text string width.
    fontSize
    Font size.
    wordWrap
    A value indicating whether to enable automatic word wrap to the beginning of the next line when necessary.
    lineSpacing
    Line spacing.
    Requirements

    Target Platforms: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also