THotPDF.AddLoadedOptionalContentMembership Method
Builds an Optional Content Membership Dictionary (ISO 32000-1 8.11.2.2) whose visibility depends on several optional content groups combined by one policy
Declaration
function AddLoadedOptionalContentMembership(const OCGIndices: array of Integer; Policy: THPDFOCMDPolicy): Integer;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
OCGIndices | Indices of the optional content groups included in /OCGs |
Policy | Combination policy: AnyOn, AllOn, AnyOff, or AllOff |
Return value
Object number of the new OCMD dictionary, for attaching to a page or XObject /OC entry
Usage notes
- Attach the returned object number to a page or XObject /OC entry to gate its visibility
- Evaluation reuses the same rules as THotPDF.EvaluateLoadedOCVisibility