THotPDF.GetLoadedOutlineColor Method
Reads the RGB colour component values of the specified bookmark (outline) entry in the loaded PDF document
Declaration
function GetLoadedOutlineColor(Index: Integer; out AR, AG, AB: Single): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Index | Zero-based index of the bookmark entry |
AR | Output parameter, receives the red component value (0.0 to 1.0) |
AG | Output parameter, receives the green component value (0.0 to 1.0) |
AB | Output parameter, receives the blue component value (0.0 to 1.0) |
Return value
Returns True if the colour information is successfully read; returns False if the bookmark entry does not contain a colour attribute or the index is out of bounds
Usage notes
- 返回 False 时,AR、AG、AB 的值未定义,调用方不应依赖其内容
- Colour component values range from 0.0 to 1.0, corresponding to the device RGB colour space in the PDF specification
- Some PDF generators do not write bookmark colours; it is normal for this to return False in such cases