DrawWrappedText

Text, Page layout

Description

Draw text which is wrapped to a certain width. The SetTextAlign function can be used to change the alignment of the text. The SetBreakString function can be used to set the delimiter for the linebreak. The default is CR / LF pair.

Syntax

Delphi

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

ActiveX

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

DLL

int DLDrawWrappedText(int InstanceID, double XPos, double YPos, double Width, const wchar_t* Text);
int DLDrawWrappedTextA(int InstanceID, double XPos, double YPos, double Width, const char* Text);

Parameters

XPosThe left edge of the text block
YPosThe baseline of the first line of text, for every alignment set with SetTextAlign. Every following line is one line height lower
WidthThe width of the text block
TextThe text to draw

Return values

Returns 1 when the wrapped text was drawn; returns 0 when Width is narrower than the width of the character W in the selected font at the current text size, or the font cannot supply a required glyph and missing-glyph abort is active