DrawText

Text, Page layout

Description

Draws text on the selected page, using the selected font at the predetermined font size. If no fonts have been added, 12 pt Helvetica is automatically added and selected. The text alignment can be changed with the SetTextAlign function

Text containing Arabic, Hebrew, Indic or other complex-script characters is shaped automatically before drawing (contextual letter forms, mandatory ligatures and right-to-left ordering), provided the selected font is a TrueType or standard font with an installed system face. Use SetTextShaping to disable this routing, or DrawShapedText to shape explicitly with a chosen face. Latin, Cyrillic, Greek and CJK text always retains the plain drawing path

Syntax

Delphi

Function TPDFlib.DrawText(XPos, YPos: Double; Const Text: WideString): Integer;

ActiveX

Function PDFlib::DrawText(XPos As Double, YPos As Double, Text As String) As Long

DLL

int DLDrawText(int InstanceID, double XPos, double YPos, const wchar_t * Text);

Parameters

XPosThe horizontal position of where to draw the text. The reference point is usually to the left of the first character, unless the SetTextAlign function has been used to change the alignment.
YPosThe vertical position of where to draw the text. The reference point is the text baseline.
TextThe text to draw on the page

Remarks

While SetVerticalWritingMode is on, the text runs down the page from the given point instead of across it