API referenceCore SDK

pdfGetDocInfoEx

Enumerate document-info entries by index.

CategoryDocument metadata
NoteKey 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

ParameterTypeDescription
IPDFPPDFInstance handle.
IndexCardinalZero-based index, 0 .. pdfGetDocInfoCount-1. Enumeration order follows the underlying dictionary's iteration order, not insertion order.
DInfoTDocumentInfo*Receives the ordinal.
KeyPAnsiChar*Always NULL — see the chapter note (no per-entry custom key is stored).
ValuePAnsiChar*Receives the value, UTF-8 encoded.
UnicodeBOOL32*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 & buffersValue points at an engine-owned buffer valid until the next call to this function.

See alsopdfGetDocInfo

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.