API referenceCore SDK

pdfDeleteSeparationInfo

pdfGetSeparationInfo reads back the first registered

C
BOOL32 __stdcall pdfGetSeparationInfo(PPDF IPDF, const char* Colorant, TExtColorSpace* CS);
BOOL32 __stdcall pdfSetSeparationInfo(PPDF IPDF, uint32_t Handle);
BOOL32 __stdcall pdfDeleteSeparationInfo(PPDF IPDF, BOOL32 AllPages);
Delphi
function pdfGetSeparationInfo(const IPDF: PPDF; var Colorant: PAnsiChar; var CS: TExtColorSpace): LongBool; stdcall;
function pdfSetSeparationInfo(const IPDF: PPDF; Handle: Cardinal): LongBool; stdcall;
function pdfDeleteSeparationInfo(const IPDF: PPDF; AllPages: LongBool): LongBool; stdcall;

Purpose. pdfGetSeparationInfo reads back the first registered Separation color space's colorant name and alternate space (despite the generic-sounding name, this is not a lookup-by-colorant query); pdfSetSeparationInfo records which Separation handle is "current" for some downstream consumer; pdfDeleteSeparationInfo clears the tracked Separation info.

Description. pdfGetSeparationInfo's Colorant parameter is actually an output-only var PAnsiChar, not an input lookup key despite the C declaration showing const char* Colorant — the Pascal signature passes it by reference and the implementation immediately overwrites it. There is no way to query a specific named colorant's info through this function — it always returns whichever Separation color space is found first (GetFirstSeparationInfo), regardless of how many Separation spaces exist in the document. A caller needing a specific colorant's alternate space should instead use pdfGetColorSpaceObj/pdfGetColorSpaceObjEx (Colors and Color Spaces) against that color space's own handle. pdfSetSeparationInfo just stores Handle into a tracked field (SetSeparationInfoH) without validating that it resolves to an actual Separation-kind color space.

Parameters.

ParameterDescription
IPDFDocument handle.
Colorant*(Get)* Output only — filled with the first Separation space's colorant name; not a lookup input despite its const char* C declaration.
CS*(Get)* Output: the first Separation space's alternate device space.
Handle*(Set)* Stored without validation.
AllPages*(Delete)* Not independently re-verified in this chapter as to its exact per-page-vs-document-wide scoping effect beyond confirming the call is real (DeleteSeparationInfo).

Return value. pdfGetSeparationInfo: True if at least one Separation space exists. pdfSetSeparationInfo/pdfDeleteSeparationInfo: True if IPDF is valid.

See also. pdfGetColorSpaceObj (the real per-handle color-space query).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Core

Exported names

pdfDeleteSeparationInfo

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.