pdfChangeSeparationColor
Change the tint-transform color and alternate device space of
BOOL32 __stdcall pdfChangeSeparationColor(PPDF IPDF, uint32_t CSHandle, uint32_t NewColor, TExtColorSpace Alternate, int32_t AltHandle);
function pdfChangeSeparationColor(const IPDF: PPDF; CSHandle, NewColor: Cardinal; Alternate: TExtColorSpace; AltHandle: Integer): LongBool; stdcall;
Purpose. Change the tint-transform color and alternate device space of an existing Separation color space.
Description. Resolves CSHandle via FindCSByHandle; fails if the handle is unknown or if it does not identify a Separation-kind color space (Kind <> cskSeparation — calling this on an ICC/CIE/DeviceN/Indexed handle fails). On success, updates that Separation entry's SepColor to NewColor and its AltDevCS to the mapped device space for Alternate (1 → DeviceCMYK, 2 → DeviceGray, anything else including 0 → DeviceRGB). The AltHandle parameter accepted by the ABI is never read by the implementation — it is silently dropped; only the coarse Alternate: TExtColorSpace device-space selector has any effect, so a custom ICC/CIE alternate space referenced by handle cannot actually be assigned through this call despite the parameter's presence.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
CSHandle | Handle of an existing Separation color space. |
NewColor | New tint/reference color value stored on the Separation entry. |
Alternate | Device alternate space selector — only esDeviceCMYK(1)/esDeviceGray(2) are distinguished; every other value (including esDeviceRGB) maps to DeviceRGB. |
AltHandle | Accepted but ignored — has no effect regardless of value. |
Return value. True if CSHandle resolved to a Separation space and was updated; False otherwise.
See also. pdfRenameSpotColor.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfChangeSeparationColor
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.