THotPDF.GetLoadedOCGName Method
Gets the name of the optional content group by index
Declaration
function GetLoadedOCGName(Index: Integer): AnsiString;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Index | Zero-based index or object index used to select an existing item |
Return value
Returns an AnsiString value
Usage notes
- Layer names are commonly used for UI display or later lookups
- Keep object names, field names, resource names, and returned handles stable until the document is finalised
- Loaded-document object references may be indirect; resolve arrays, dictionaries, or streams before inspecting nested values