| Category | Text decoration |
|---|---|
| Exported names | pdfSetTextShaderA, pdfSetTextShaderW, pdfSetTextShader |
| Availability | Non-functional (write-only) — see the chapter note above |
Purpose — Nominally: associate a named shading pattern with subsequent text fills.
Description — accepted but not applied. Stores ShaderName into FTextShaderName and always returns 1. That field is never consulted anywhere else in the codebase — no writer applies it to any content stream. Calling this API has no observable effect on output.
Declarations
int32_t __stdcall pdfSetTextShader(PPDF IPDF, const char* ShaderName);
int32_t __stdcall pdfSetTextShaderA(PPDF IPDF, const char* ShaderName);
int32_t __stdcall pdfSetTextShaderW(PPDF IPDF, const wchar_t* ShaderName);
function pdfSetTextShaderA(const IPDF: PPDF; ShaderName: PAnsiChar): Integer; stdcall; external 'LumasPdf.dll';
function pdfSetTextShaderW(const IPDF: PPDF; ShaderName: PWideChar): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
ShaderName | string | Accepted and stored; has no effect on output. |
Return value — Always 1 on a valid handle; 0 on an invalid handle. The success return gives no indication of the no-op behavior.
C# (P/Invoke)
public static extern int pdfSetTextShaderW(IntPtr IPDF, IntPtr ShaderName);
public static extern int pdfSetTextShader(IntPtr IPDF, IntPtr ShaderName);
public static extern int pdfSetTextShaderA(IntPtr IPDF, IntPtr ShaderName);
Setters
pdfSetTextShaderW
pdfSetTextShader
pdfSetTextShaderA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.