| Category | Document metadata |
|---|---|
| Note | Key is always NULL — see the chapter note |
Purpose — Enumerate document-info entries by index.
Declarations
C
int32_t __stdcall pdfGetDocInfoEx(PPDF IPDF, uint32_t Index, TDocumentInfo* DInfo, const char* Key, const char* Value, BOOL32* Unicode);
Delphi
function pdfGetDocInfoEx(const IPDF: PPDF; Index: Cardinal; var DInfo: TDocumentInfo; var Key, Value: PAnsiChar; var Unicode: LongBool): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Index | Cardinal | Zero-based index, 0 .. pdfGetDocInfoCount-1. Enumeration order follows the underlying dictionary's iteration order, not insertion order. |
DInfo | TDocumentInfo* | Receives the ordinal. |
Key | PAnsiChar* | Always NULL — see the chapter note (no per-entry custom key is stored). |
Value | PAnsiChar* | Receives the value, UTF-8 encoded. |
Unicode | BOOL32* | Always FALSE — the value is always returned as UTF-8 regardless of how it was set (A or W). |
Return value — Value length in bytes on success, 0 if Index is out of range or the handle is invalid.
Memory & buffers — Value points at an engine-owned buffer valid until the next call to this function.
See also — pdfGetDocInfo
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetDocInfoEx(IntPtr IPDF, uint Index, ref TDocumentInfo DInfo, ref IntPtr Key, ref IntPtr Value, [MarshalAs(UnmanagedType.Bool)] ref bool Unicode);
Area
Core SDK
Category
Getters
Exported names
pdfGetDocInfoEx
String variants
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
See working code
Worked examples — complete programs in ten languages.