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



In This Topic
    DrawString(String,Font,PdfPen,RectangleF,StringFormat) Method
    In This Topic
    Draws the specified text string in vector form at the specified rectangle using specified PdfPen 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 pen As PdfPen, _
       ByVal rect As RectangleF, _
       ByVal sf As StringFormat _
    ) 
    public void DrawString( 
       string s,
       Font font,
       PdfPen pen,
       RectangleF rect,
       StringFormat sf
    )
    public: void DrawString( 
       string* s,
       Font* font,
       PdfPen* pen,
       RectangleF rect,
       StringFormat* sf
    ) 
    public:
    void DrawString( 
       String^ s,
       Font^ font,
       PdfPen^ pen,
       RectangleF rect,
       StringFormat^ sf
    ) 

    Parameters

    s
    String to draw.
    font
    System.Drawing.Font that defines the string.
    pen
    PdfPen to draw the text.
    rect
    System.Drawing.RectangleF structure that specifies the location of the drawn text.
    sf
    System.Drawing.StringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
    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