pdfGetLayerConfig
Read metadata (intent, default flag, name) for one configuration
| Category | Optional content |
|---|
Purpose — Read metadata (intent, default flag, name) for one configuration by index.
Description — Index=0 always returns IsDefault=TRUE, Intent=oiView (4), NameA=NULL (the built-in default config is unnamed). Index >= 1 reads a named config's stored Intent and Name.
Declarations
BOOL32 __stdcall pdfGetLayerConfig(PPDF IPDF, int32_t Index, TPDFOCLayerConfig* Config);
function pdfGetLayerConfig(const IPDF: PPDF; Index: Integer; var Config: TPDFOCLayerConfig): LongBool; stdcall; external 'LumasPdf.dll';
TPDFOCLayerConfig:
TPDFOCLayerConfig = record
StructSize: Cardinal;
Intent: Cardinal; // TOCGIntent: oiDesign=2, oiView=4 (default), oiAll=8
IsDefault: LongBool;
NameA: PAnsiChar; // engine-owned; nil for the (unnamed) default config
NameW: PWideChar; // always nil in this build
NameLen: Cardinal;
end;
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Index | Integer | 0..pdfGetLayerConfigCount-1. |
Config | TPDFOCLayerConfig* | Receives the metadata; Config.StructSize is written by this call (unlike several sibling getters in this SDK). |
Return value — TRUE if Index is in range; FALSE otherwise.
Memory & buffers — Config.NameA points into an engine-owned buffer valid until the next call on the same handle.
See also — pdfGetLayerConfigCount, pdfLoadLayerConfig
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetLayerConfig
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.