int32_t __stdcall pdfGetColorSpace(PPDF IPDF);
function pdfGetColorSpace(const IPDF: PPDF): Integer; stdcall;
Purpose. Return the current fill color space.
Description. Returns FFillCS (GetFillCSVal) — the device ordinal or registered handle last applied to the fill side by pdfSetColorSpace or pdfSetFillColorSpace. There is no corresponding stroke-side getter in the ABI — FStrokeCS can be written (via pdfSetColorSpace or pdfSetStrokeColorSpace) but never read back through a dedicated export. A caller that needs to track the stroke color space must maintain its own shadow copy of whatever value it last set.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Return value. The current fill color space (device ordinal or registered handle); 0 if IPDF is invalid.
See also. pdfSetColorSpace.
C# (P/Invoke)
public static extern int pdfGetColorSpace(IntPtr IPDF);
Getters
pdfGetColorSpace
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.