pdfCreateSeparationCS
Register a new Separation color space (a single-colorant
int32_t __stdcall pdfCreateSeparationCS(PPDF IPDF, const char* Colorant, int32_t Alternate, int32_t Handle, uint32_t Color);
function pdfCreateSeparationCS(const IPDF: PPDF; const Colorant: PAnsiChar; Alternate, Handle: Integer; Color: Cardinal): Integer; stdcall;
Purpose. Register a new Separation color space (a single-colorant spot color with an alternate device-space fallback and reference tint).
Description. Maps Alternate the same coarse way as pdfChangeSeparationColor (Colors and Color Spaces): 1→DeviceCMYK, 2→DeviceGray, anything else→DeviceRGB. Handle is accepted by the ABI but never passed through to CreateSeparationColorSpace — the same dropped- parameter pattern already confirmed for pdfCreateDeviceNColorSpace and pdfCreateIndexedColorSpace (Color-Space Creation and Color Conversion): a fresh handle is always auto-allocated, a caller cannot force a specific handle number.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Colorant | The spot-colorant name; nil fails. |
Alternate | Device alternate space — only CMYK(1)/Gray(2) distinguished, else RGB. |
Handle | Accepted but ignored — a new handle is always auto-allocated. |
Color | Reference tint color. |
Return value. The new color-space handle; 0 if IPDF is invalid or Colorant is nil.
See also. pdfChangeSeparationColor, pdfRenameSpotColor.
C# (P/Invoke)
public static extern int pdfCreateSeparationCS(IntPtr IPDF, [MarshalAs(UnmanagedType.LPStr)] string Colorant, int Alternate, int Handle, uint Color);
Object Creation
pdfCreateSeparationCS
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.