pdfSetTextUnderlineCustomDash
Set an arbitrary PDF dash array for the underline stroke.
| Category | Text decoration |
|---|
Purpose — Set an arbitrary PDF dash array for the underline stroke.
Description — DashPattern is written verbatim as the PDF dash-array literal (e.g. "3 2 1 2" for a dash-dot pattern) — no validation of its syntax is performed by this call; malformed input reaches the content stream as-is. Setting a custom dash clears any simple on/off dash previously set via pdfSetTextUnderlineDash (the two are mutually exclusive — last-write-wins).
Declarations
int32_t __stdcall pdfSetTextUnderlineCustomDash(PPDF IPDF, const char* DashPattern, double DashPhase);
int32_t __stdcall pdfSetTextUnderlineCustomDashA(PPDF IPDF, const char* DashPattern, double DashPhase);
int32_t __stdcall pdfSetTextUnderlineCustomDashW(PPDF IPDF, const wchar_t* DashPattern, double DashPhase);
function pdfSetTextUnderlineCustomDashA(const IPDF: PPDF; DashPattern: PAnsiChar; DashPhase: Double): Integer; stdcall; external 'LumasPdf.dll';
function pdfSetTextUnderlineCustomDashW(const IPDF: PPDF; DashPattern: PWideChar; DashPhase: Double): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
DashPattern | string | Raw PDF dash-array literal (space-separated numbers), not validated. |
DashPhase | Double | Dash phase offset. |
Return value — 1 on a valid handle; 0 on an invalid handle.
See also — pdfSetTextUnderlineDash
C# (P/Invoke)
public static extern int pdfSetTextUnderlineCustomDashW(IntPtr IPDF, IntPtr DashPattern, double DashPhase);
public static extern int pdfSetTextUnderlineCustomDash(IntPtr IPDF, IntPtr DashPattern, double DashPhase);
public static extern int pdfSetTextUnderlineCustomDashA(IntPtr IPDF, IntPtr DashPattern, double DashPhase);
Setters
pdfSetTextUnderlineCustomDashW
pdfSetTextUnderlineCustomDash
pdfSetTextUnderlineCustomDashA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.