Viewer Layers

From Wiki
Jump to navigation Jump to search

PDF has a concept of layers that you can enable and disable (at least in a few viewers). This has nothing to do with ConTeXt’s Layers.

There’s no other documentation yet, maybe have a look into the sources attr-lay.mkiv, attr-lay.lua and lpdf-ren.lua. It’s also used in some presentation styles.

  visible=no, % initially
  %tag=, % don’t know?
  editable=yes, % in Acrobat Pro?
  export=yes, % exportable in xml?
  scope=global, % or local

\input tufte

This information is on a different plane of existence.

\input knuth

\viewerlayer[Plane]{Some more hidden text...}

You can switch the visibility of layers with the JavaScript functions HideLayer and VideLayer (from scrn-fld.mkvi:


\startviewerlayer[test]Hide Me\stopviewerlayer



Viewer layers are known to work within \setlayer (see Layers), e.g. meta-ini.mkiv.