Skip to main content

parse_order

Function parse_order 

Source
pub fn parse_order(
    resolver: &Resolver<'_>,
    obj: &PdfObj,
    sink: &WarningSink,
) -> LayerTree
Expand description

Parse /Order according to ISO 32000-2 §8.11.4.3.

The array is walked left-to-right with one element of look-back state to classify each item:

  • OCG ref — leaf LayerTreeNode::Layer.
  • OCG ref immediately followed by a nested array — the array is consumed as that layer’s section (header-layer section).
  • String literal followed by a nested array — labelled section.
  • Bare nested array — anonymous section.
  • String not followed by an array — dropped with a warning.