VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging.Pdf.Drawing Namespace / PdfGraphics Class / DrawString Method / DrawString(String,PdfFont,Single,PdfBrush,RectangleF,PdfContentAlignment,Boolean) Method
String to draw.
Vintasoft.Imaging.Pdf.Tree.Fonts.PdfFont that defines the text format of the string.
Font size.
A PdfBrush that determines the color of the drawn text.
A System.Drawing.RectangleF structure that specifies the location of the drawn text.
Text alignment.
Enables automatically wraps words to the beginning of the next line when necessary.



In This Topic
    DrawString(String,PdfFont,Single,PdfBrush,RectangleF,PdfContentAlignment,Boolean) Method
    In This Topic
    Draws the specified text string on the specified rectangle.
    Syntax
    'Declaration
     
    Public Overloads Sub DrawString( _
       ByVal s As String, _
       ByVal font As PdfFont, _
       ByVal fontSize As Single, _
       ByVal brush As PdfBrush, _
       ByVal rect As RectangleF, _
       ByVal textAlignment As PdfContentAlignment, _
       ByVal wordWrap As Boolean _
    ) 
    public void DrawString( 
       string s,
       PdfFont font,
       float fontSize,
       PdfBrush brush,
       RectangleF rect,
       PdfContentAlignment textAlignment,
       bool wordWrap
    )
    public: void DrawString( 
       string* s,
       PdfFont* font,
       float fontSize,
       PdfBrush* brush,
       RectangleF rect,
       PdfContentAlignment textAlignment,
       bool wordWrap
    ) 
    public:
    void DrawString( 
       String^ s,
       PdfFont^ font,
       float fontSize,
       PdfBrush^ brush,
       RectangleF rect,
       PdfContentAlignment textAlignment,
       bool wordWrap
    ) 

    Parameters

    s
    String to draw.
    font
    Vintasoft.Imaging.Pdf.Tree.Fonts.PdfFont that defines the text format of the string.
    fontSize
    Font size.
    brush
    A PdfBrush that determines the color of the drawn text.
    rect
    A System.Drawing.RectangleF structure that specifies the location of the drawn text.
    textAlignment
    Text alignment.
    wordWrap
    Enables automatically wraps words to the beginning of the next line when necessary.
    Remarks
    This method does NOT ignore carriage returns and new line characters.

    Use overloaded method that takes point that specifies location, instead of rectangle, if carriage returns and new line characters should be ignored.
    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also