Skip to main content

Module ocmd

Module ocmd 

Source
Expand description

Optional Content Membership Dictionary (OCMD) parsing.

Defined in ISO 32000-2 §8.11.2.2. An OCMD wraps a set of OCGs in a visibility predicate that’s more expressive than a single OCG ref:

  • /P membership policy over /OCGsAllOn / AnyOn / AllOff / AnyOff. Default policy is AnyOn.
  • /VE visibility expression — a nested array using /And / /Or / /Not operators over OCG refs. Available since PDF 1.6.

/VE takes precedence over /P when both are present.

This module produces OcgVisibility values for the display list. The matching evaluator lives in stet_graphics::layer_set::LayerSet.

Functions§

build_ocmd_visibility
Build an OcgVisibility for an OCMD dict.
parse_visibility_expression
Parse an OCMD /VE array into a VisibilityExpr.