| Category | Text decoration |
|---|---|
| Note | scoped to pdfWriteText/Ex only, see the chapter note above |
Purpose — Turn underlining on/off for subsequent text writes.
Description — Sets the global FUnderlineOn flag consulted by EmitUnderline. Default underline appearance when no other pdfSetTextUnderline* call has customized it: width = fontSize × 0.05, distance below baseline = fontSize × 0.10, solid line, color = the current text fill color.
Declarations
int32_t __stdcall pdfSetTextUnderline(PPDF IPDF, int32_t Underline);
function pdfSetTextUnderline(const IPDF: PPDF; Underline: Integer): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Underline | Integer | 0 = off, non-zero = on. |
Return value — 1 on a valid handle; 0 on an invalid handle. Cannot otherwise fail.
Remarks — Only affects text drawn via pdfWriteText/Ex — see the chapter-level note.
See also — pdfSetTextUnderlineColor, pdfSetTextUnderlineWidth
C# (P/Invoke)
public static extern int pdfSetTextUnderline(IntPtr IPDF, int Underline);
Setters
pdfSetTextUnderline
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.