Get the number of layers.
getNumLayers([out, retval] int *numLayers)
This function returns the number of layers in the PDF file.
Layers are numbered 0 through n-1 (where n is the value returned by
Note that many PDF files have zero layers, meaning that there is no
content that can be selectively turned on or off. (This is different
from some other formats which always have at least one layer.)
n = viewer.getNumLayers
For i = 0 To n-1
layer = viewer.getLayer(i)
name = viewer.getLayerName(layer)
visible = viewer.getLayerVisibility(layer)
' ... add a list entry using name and visible ...