getLayerViewState
Get the suggested state of a layer for viewing mode.
getLayerViewState([in] LONG layerHandle, [out, retval] int *state)
This function returns the suggested state for a layer when viewing the
PDF file. The return value is +1 if the layer should be on (visible),
0 if the layer should be off (not visible), or -1 if there is no
suggested state information for the layer.
The layer argument is an opaque layer handle, returned by
getLayer
.
The getLayerPrintState
function is similar, but gets the
suggested state for printing (rather than viewing).
VB:
layer = pdf.getLayer(i)
' set the layer to the default state for viewing
state = pdf.getLayerViewState(layer)
If state = 0 Then
pdf.setLayerVisibility(layer, False)
Else If state = 1 Then
pdf.setLayerVisibility(layer, True)
End If