| Category | Text output / flowed text |
|---|
Purpose — Same as pdfWriteFText, but sets the text rectangle explicitly in the same call.
Description — Calls SetTextRect(PosX, PosY, Width, Height) then WriteFlowText — the format-tag support, line-height rule, and alignment-override tags documented under pdfWriteFText all apply identically. This is generally the entry point to prefer, since it removes the easy-to-miss pdfSetTextRect precondition.
Declarations
BOOL32 __stdcall pdfWriteFTextExA(PPDF IPDF, double PosX, double PosY, double Width, double Height, int32_t Align, const char* AText);
BOOL32 __stdcall pdfWriteFTextExW(PPDF IPDF, double PosX, double PosY, double Width, double Height, int32_t Align, const wchar_t* AText);
function pdfWriteFTextExA(const IPDF: PPDF; PosX, PosY, Width, Height: Double; Align: Integer; const AText: PAnsiChar): LongBool; stdcall; external 'LumasPdf.dll';
function pdfWriteFTextExW(const IPDF: PPDF; PosX, PosY, Width, Height: Double; Align: Integer; const AText: PWideChar): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
PosX, PosY | Double | Top-left of the flow rectangle. |
Width, Height | Double | Rectangle size. Both must be > 0 or nothing is drawn (mirrors SetTextRect's FHasTextRect gate). |
Align | Integer | Same ta* values as TTextAlign, but passed as a plain Integer here (not the TTextAlign type) — functionally identical, just a looser ABI type on this overload. |
AText | string | Text to flow. |
Return value — TRUE if at least one line was drawn; FALSE if Width/Height aren't both positive, no font is selected, or AText is empty.
See also — pdfWriteFText, pdfGetFTextHeightEx
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Text
pdfWriteFTextExA
pdfWriteFTextExW
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.