Skip to main content

Module metadata

Module metadata 

Source
Expand description

Per-layer metadata (Optional Content Groups).

Defined in ISO 32000-2 §8.11.2 (the OCG dictionary itself) and §8.11.4.4 (the /Usage sub-dict, which describes the contexts — view, print, export — in which the layer is meaningful).

Phase 1 is document-wide enumeration: produce one Layer record per OCG referenced from the catalog’s /OCProperties /OCGs array. Visibility defaults come from the default configuration’s /OFF array; locked state from /Locked. Hierarchy (/Order) and alternate configurations live in Phase 2.

Structs§

CreatorInfo
/CreatorInfo sub-dict — authoring application + subtype hint.
ExportUsage
/Export sub-dict.
LanguageUsage
/Language sub-dict.
Layer
One Optional Content Group (PDF “layer”).
LayerUsage
Hints from the OCG /Usage sub-dict.
PrintUsage
/Print sub-dict.
UserUsage
/User sub-dict — user/group ownership.
ViewUsage
/View sub-dict.
ZoomUsage
/Zoom sub-dict — visibility range.

Enums§

LayerIntent
/Intent on an OCG, declaring which audiences the layer is for.
PageElementSubtype
/PageElement /Subtype value — role of the layer on the page.
UsageState
Usage state — /ON or /OFF.

Functions§

parse_layer
Parse one OCG dict into a Layer.
parse_layers
Walk the catalog’s /OCProperties /OCGs array and produce one Layer per OCG.
parse_usage_dict
Parse an entire /Usage dict into a LayerUsage.