API referenceText

pdfSetTextUnderlineWidth

Set the underline stroke width.

CategoryText decoration

Purpose — Set the underline stroke width.

Declarations

C
int32_t __stdcall pdfSetTextUnderlineWidth(PPDF IPDF, double UnderlineWidth);
Delphi
function pdfSetTextUnderlineWidth(const IPDF: PPDF; UnderlineWidth: Double): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
UnderlineWidthDoubleStroke width in points. 0 or negative (the sentinel) falls back to fontSize × 0.05 at draw time — same "0 means unset" pattern as pdfSetTextUnderlineDistance.

Return value1 on a valid handle; 0 on an invalid handle.

See alsopdfSetTextUnderlineDistance

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfSetTextUnderlineWidth(IntPtr IPDF, double UnderlineWidth);
Area
Text
Category

Setters

Exported names

pdfSetTextUnderlineWidth

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.