PdfOptionalContentProperties Class

Definition

The document's optional content properties: every optional content group, the default and alternate configurations, and the visibility computation over them.

public sealed class PdfOptionalContentProperties

Remarks

ISO 32000-2 §8.11 (PDF 1.5), §8.11.4.2, Table 98. Read from the catalog's OCProperties; when it is absent there is no optional content and every optional content structure is ignored (OptionalContent is null; all content is visible).

The group list (OCGs) and each group's intents are read when the view is created, recording the version of every container read: OptionalContent returns a new view once OCProperties is replaced, any of them has changed, or an object was added or removed (§7.3.10), and states computed from the old view are refused by the new one. Each membership dictionary's compiled visibility is recompiled when its dictionary or arrays change or an object is added or removed. Everything else (configurations, names, usage) reads the COS objects on every call. Nothing is ever written to the file: a missing D reads as an empty configuration with a diagnostic.

Visibility (§8.11.2, §8.11.3): content marked with a group listed in OCGs is visible when the group is ON; with a membership dictionary, when its visibility expression or policy says so. Content marked with anything else (a group not listed, a dictionary that is neither) is not optional content and is visible. Nested optional content is visible only when every level is (PdfOptionalContentTracker). IsVisible(CosObject?, PdfOptionalContentState) allocates nothing once a membership is compiled.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (4)

Methods (7)