DynaPDF Manual - Page 449

Previous Page 448   Index   Next Page 450

Function Reference
Page 449 of 839
GetLayerConfig
Syntax:
LBOOL pdfGetLayerConfig(
const PPDF* IPDF,
// Instance pointer
SI32 Index,
// Index or -1 for the default config
struct TPDFOCLayerConfig* Out) // Required. See below
struct TPDFOCLayerConfig
{
UI32
StructSize; // Must be set to sizeof(TOCLayerConfig)
TOCGIntent
Intent;
// Possible values oiDesign, oiView, or oiAll.
LBOOL
IsDefault;
// 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.
UI32
NameLen;
// 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.
GetLayerConfigCount
Syntax:
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