API reference › Rendering & Viewer
rasInitColorManagement
Enable viewer-side color management on the page cache.
BOOL32 __stdcall rasInitColorManagement(IPGC CachePtr, PPDFColorProfiles Profiles, TPDFInitCMFlags Flags);
function rasInitColorManagement(CachePtr: IPGC; Profiles: PPDFColorProfiles; Flags: TPDFInitCMFlags): LongBool; stdcall;
Purpose. Enable viewer-side color management on the page cache.
Description. Partially real: the on/off state and flags are genuinely retained as real, queryable cache state, but the actual ICC profile data pointed to by Profiles is not stored at all — per the inline comment ("GAP-7: ... Retains the flags (and marks the cache colour-managed) so 'InitColorManagement active' is a real, queryable state that the tile renderer can honour. The profile blob is caller-owned; we keep the flags only."). Whether the tile renderer's color-managed path does anything beyond checking the boolean (e.g. actually applying an ICC transform) was not traced further in this chapter.
Parameters.
| Parameter | Description |
|---|---|
CachePtr | Target page cache. |
Profiles | Accepted but not retained — only the fact that *some* profiles were supplied enables the flag; the actual profile bytes are not stored. |
Flags | Genuinely stored (CMFlags). |
Return value. True if CachePtr resolves; False otherwise (via the shared NotImplLogB path on failure).
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Rasterizer/Rendering
rasInitColorManagement
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.