VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging.Pdf.Drawing Namespace / PdfGraphics Class / DrawString Method / DrawString(String,Font,PdfBrush,PointF,StringFormat) Method
String to draw.
System.Drawing.Font that defines the string.
PdfBrush that determines the color and texture of the drawn text.
System.Drawing.PointF structure that specifies the text location.
System.Drawing.StringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied t the drawn text.



In This Topic
    DrawString(String,Font,PdfBrush,PointF,StringFormat) Method
    In This Topic
    Draws the specified text string in vector form at the specified location with specified PdfBrush and System.Drawing.Font objects using the formatting attributes specified by System.Drawing.StringFormat.
    Syntax
    'Declaration
     
    Public Overloads Sub DrawString( _
       ByVal s As String, _
       ByVal font As Font, _
       ByVal brush As PdfBrush, _
       ByVal location As PointF, _
       ByVal sf As StringFormat _
    ) 
    public void DrawString( 
       string s,
       Font font,
       PdfBrush brush,
       PointF location,
       StringFormat sf
    )
    public: void DrawString( 
       string* s,
       Font* font,
       PdfBrush* brush,
       PointF location,
       StringFormat* sf
    ) 
    public:
    void DrawString( 
       String^ s,
       Font^ font,
       PdfBrush^ brush,
       PointF location,
       StringFormat^ sf
    ) 

    Parameters

    s
    String to draw.
    font
    System.Drawing.Font that defines the string.
    brush
    PdfBrush that determines the color and texture of the drawn text.
    location
    System.Drawing.PointF structure that specifies the text location.
    sf
    System.Drawing.StringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied t the drawn text.
    Remarks
    This method ignores carriage returns and new line characters.

    Use overloaded method that takes rectangle, instead of point that specifies location, if carriage returns and new line characters should NOT 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