pdfSetTextUnderlineColorSep
Set the underline stroke color as a named Separation (spot)
| Category | Text decoration |
|---|---|
| Note | with a documented fallback |
Purpose — Set the underline stroke color as a named Separation (spot) color with a tint.
Description — Looks up ColorName among colorants of already-registered Separation color spaces (pdfCreateSeparationCS) at draw time. If found, the underline is stroked with a real /Separation resource reference. If no matching colorant is registered, the engine falls back to a grayscale approximation (1.0 - Tint gray) rather than failing — silent, not an error, so a typo'd ColorName produces plausible-looking gray output instead of a diagnosable failure.
Declarations
int32_t __stdcall pdfSetTextUnderlineColorSep(PPDF IPDF, const char* ColorName, double Tint);
int32_t __stdcall pdfSetTextUnderlineColorSepA(PPDF IPDF, const char* ColorName, double Tint);
int32_t __stdcall pdfSetTextUnderlineColorSepW(PPDF IPDF, const wchar_t* ColorName, double Tint);
function pdfSetTextUnderlineColorSepA(const IPDF: PPDF; ColorName: PAnsiChar; Tint: Double): Integer; stdcall; external 'LumasPdf.dll';
function pdfSetTextUnderlineColorSepW(const IPDF: PPDF; ColorName: PWideChar; Tint: Double): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
ColorName | string | Colorant name; must match a Separation color space registered via pdfCreateSeparationCS for a real spot color to be used. |
Tint | Double | 0.0..1.0 tint value. |
Return value — 1 on a valid handle; 0 on an invalid handle. Does not fail when ColorName has no match — see Description.
See also — pdfCreateSeparationCS
C# (P/Invoke)
public static extern int pdfSetTextUnderlineColorSepW(IntPtr IPDF, IntPtr ColorName, double Tint);
public static extern int pdfSetTextUnderlineColorSep(IntPtr IPDF, IntPtr ColorName, double Tint);
public static extern int pdfSetTextUnderlineColorSepA(IntPtr IPDF, IntPtr ColorName, double Tint);
Setters
pdfSetTextUnderlineColorSepW
pdfSetTextUnderlineColorSep
pdfSetTextUnderlineColorSepA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.