Namespace: BitMiracle.Docotic.Pdf
public int DrawText( string text, PdfTextDrawingOptions options )
Public Function DrawText ( text As String, options As PdfTextDrawingOptions ) As Integer
Exception | Condition |
---|---|
ArgumentException | text contains an invalid surrogate pair. Either the first character in the pair is not a valid high surrogate or the second character in the pair is not a valid low surrogate. |
CannotShowTextException | text contains a glyph that cannot be drawn using the current Font and cannot be substituted using the options.MissingGlyphHandler. |
This method allows you to draw single-line or multi-line text within a Bounds rectangle. This method clips the text so that it does not appear outside the specified rectangle.
Lines are automatically broken between words if a word would extend past the edge of the bounding rectangle. A carriage return-line feed sequence also breaks the line.
Please use DrawString() methods if you want to draw only one line of text at the specified position.