Skip to main content

layer_set_from_document

Function layer_set_from_document 

Source
pub fn layer_set_from_document(doc: &PdfDocument<'_>) -> LayerSet
Expand description

Build a LayerSet populated from a PdfDocument’s default configuration (/OCProperties /D).

Each layer gets an explicit override matching its default_visible flag; the resulting set is therefore equivalent to “what the document looks like with no user toggles applied” but lets a UI toggle individual layers from a known starting point.