NewOptionalContentMembership

Content Streams and Optional Content Groups

Description

Creates an indirect optional content membership dictionary from one or more optional content groups and a compatibility visibility policy

Syntax

Function TPDFlib.NewOptionalContentMembership(Const OptionalContentGroupIDs: Array Of Integer; Policy: TPDFlibOCMDPolicy): Integer;

Parameters

OptionalContentGroupIDsA non-empty array of optional-content group handles from the selected document
PolicyThe policy used by readers that evaluate /OCGs and /P

Return values

Returns a membership handle, or 0 when the input is invalid or PDF/A-1 mode is active

Remarks

The function writes a PDF 1.5 /Type /OCMD dictionary

Pass the returned handle to BeginOptionalContent or any supported optional-content assignment function

See also

SetOptionalContentMembership, TPDFlibOCMDPolicy, NewOptionalContentGroup