THotPDF.GetLoadedOCGVisibility Method
Queries the default visibility state of a specified optional content group (OCG) in the loaded PDF document
Declaration
function GetLoadedOCGVisibility(Index: Integer): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Index | Zero-based index of the optional content group |
Return value
Returns True if the OCG is marked visible (ON) in the document's default configuration (D dictionary)
Usage notes
- An OCG (Optional Content Group) is what PDF calls a layer; this method reads the default state stored in the document, not the current renderer state
- The index must lie within the document's OCG array; out-of-range access returns False
- For documents containing multiple usage configurations (e.g., printing, exporting), the OCG visibility may differ between configurations; this method only reflects the default view configuration