PdfCanvas.DrawString Method (PdfPoint, String, PdfStringDrawingOptions)

Docotic.Pdf library help > BitMiracle.Docotic.Pdf > PdfCanvas Class > PdfCanvas Methods > DrawString Method > DrawString Method (PdfPoint, String, PdfStringDrawingOptions)
Draws the specified text string starting from the specified position using the specified options.

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

Syntax

C#
public void DrawString(
	PdfPoint position,
	string text,
	PdfStringDrawingOptions options
)
VB
Public Sub DrawString ( 
	position As PdfPoint,
	text As String,
	options As PdfStringDrawingOptions
)

Parameters

position
Type: BitMiracle.Docotic.Pdf.PdfPoint
A PdfPoint structure that specifies the upper-left corner of the drawn text.
text
Type: System.String
The string to draw.
options
Type: BitMiracle.Docotic.Pdf.PdfStringDrawingOptions
The drawing options.

Exceptions

ExceptionCondition
ArgumentExceptiontext 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.
CannotShowTextExceptiontext contains a glyph that cannot be drawn using the current Font and cannot be substituted using the options.MissingGlyphHandler.

Remarks

The string represented by the text parameter always spans only one line. Please use DrawText(String, PdfTextDrawingOptions) method if you want to draw more than one line of text.

See Also