DynaPDF Manual - Page 437

Previous Page 436   Index   Next Page 438

Function Reference
Page 437 of 818
LBOOL pdfGetLayerConfig(
const PPDF* IPDF,
// Instance pointer
SI32 Index,
// Index or -1 for the default config
struct TPDFOCLayerConfig* Out) // Required. See below
struct TPDFOCLayerConfig
StructSize; // Must be set to sizeof(TOCLayerConfig)
// Possible values oiDesign, oiView, or oiAll.
// If true, this is the default configuration.
const char* NameA;
// Optional configuration name. The default config has
// usually no name but all others should have one.
const UI16* NameW;
// Either the Ansi or Unicode string is set at time.
// Length in characters.
The function retrieves the most important properties of a layer configuration. A PDF file can contain
one or more layer configurations so that different layers can be initially shown or hidden.
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.
To determine the number of available configurations call GetLayerConfigCount(). The first index is
denoted by 0.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SI32 pdfGetLayerConfigCount(
const PPDF* IPDF) // Instance pointer
The function returns the number of available layer configurations. Note that it is possible that a
document contains layers but no layer configuration. To determine whether a document contains
layers or optional content groups use GetOCGCount().
To load a specific layer configuration call LoadLayerConfig().

Previous topic: GetLaunchAction

Next topic: GetLeading, GetLineCapStyle, GetLineJoinStyle

Start Chat