PdfCanvas.DrawText Method (String, PdfTextDrawingOptions)

Draws the specified text string using the specified formatting options.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public int DrawText(
	string text,
	PdfTextDrawingOptions options
)
VB
Public Function DrawText ( 
	text As String,
	options As PdfTextDrawingOptions
) As Integer

Parameters

text
Type: System.String
The text to draw.
options
Type: BitMiracle.Docotic.Pdf.PdfTextDrawingOptions
The drawing options.

Return Value

Type: Int32
The number of drawn characters.

Remarks

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.

See Also