Function Reference
Page 570 of 839
LoadLayerConfig
Syntax:
LBOOL pdfLoadLayerConfig(
const PPDF* IPDF, // Instance pointer
SI32 Index)
// See description
The function loads the specified layer configuration. A PDF file that contains layers (Optional
Content Groups in PDF syntax) contains usually at least a default configuration dictionary. This
configuration is loaded by default when the visibility state of a layer or optional content group must
be determined, e.g. when rendering a page.
Use this function to load another configuration if available. To determine the number of available
configurations call GetLayerConfigCount().
The parameter Index can be one of the following:
•
-1: Load the default configuration.
•
-2: If a configuration was already loaded, leave it unchanged. Load
the default configuration otherwise.
•
0..Count -1: Load the specified configuration.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
LockLayer
Syntax:
LBOOL pdfLockLayer(
const PPDF* IPDF, // Instance pointer
UI32 Layer)
// Handle of an OCG
The functions adds a layer to the list of locked layers. The state of a locked layer cannot be changed
through the user interface of a PDF viewer. However, the state of locked layers can still be changed
via Javascript or SetOCGState actions.
Returns values:
If the function succeeds the return value is 1. If the function fails the return value is 0.