PdfContents.DrawText Method (Double, Double, Double, Int32, TextBox, PdfPage)

PDF File Writer

PdfContentsDrawText Method (Double, Double, Double, Int32, TextBox, PdfPage)

Draw TextBox

Namespace:  PdfFileWriter
Assembly:  PdfFileWriter (in PdfFileWriter.dll) Version: 1.1.24.0 (1.1.24.0)
Syntax
C#
public int DrawText(
	double PosX,
	ref double PosYTop,
	double PosYBottom,
	int LineNo,
	TextBox TextBox,
	PdfPage Page = null
)

Parameters

PosX
Type: SystemDouble
Position X
PosYTop
Type: SystemDouble
Position Y (by reference)
PosYBottom
Type: SystemDouble
Position Y bottom
LineNo
Type: SystemInt32
Start at line number
TextBox
Type: PdfFileWriterTextBox
TextBox
Page (Optional)
Type: PdfFileWriterPdfPage
Page if TextBox contains web link segment

Return Value

Type: Int32
Next line number
Remarks
Before calling this method you must add text to a TextBox object.

Set the PosX and PosYTop to the left top corner of the text area. Note PosYTop is by reference. This variable will be updated to the next vertical line position after the method was executed.

Set the PosYBottom to the bottom of your page. The method will not print below this value.

Set the LineNo to the first line to be printed. Initially this will be zero. After the method returns, PosYTop is set to next print line on the page and LineNo is set to next line within the box.

If LineNo is equals to TextBox.LineCount the box was fully printed.

If LineNo is less than TextBox.LineCount box printing was not done. Start a new PdfPage and associated PdfContents. Set PosYTop to desired start position. Set LineNo to the value returned by this method, and call the method again.

If your TextBox contains WebLink segment you must supply Page argument and position X and Y must be relative to page bottom left corner.

See Also