BOOL32 __stdcall pdfGetNamedDest(PPDF IPDF, uint32_t Index, TPDFNamedDest* Dest);
int32_t __stdcall pdfGetNamedDestCount(PPDF IPDF);
function pdfGetNamedDest(const IPDF: PPDF; Index: Cardinal; var Dest: TPDFNamedDest): LongBool; stdcall;
function pdfGetNamedDestCount(const IPDF: PPDF): Integer; stdcall;
Purpose. Enumerate the document's named destinations by 0-based index.
Description. Dest.NameW is always left nil (with NameLen := 0) — only Dest.NameA is ever populated, even though TPDFNamedDest carries both an ANSI and a Wide name field. Named-destination names are stored internally as byte strings (per a comment on the deletion path below), so there is no wide-string form to expose; a caller relying on NameW being filled will always see nil regardless of how the destination's name was originally created.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Index | 0-based index into the document's named-destination list. |
Dest | Output: NameA (filled), NameW/NameLen (always nil/0), SDestPage, DestType. |
Return value. pdfGetNamedDest: True if Index is in range. pdfGetNamedDestCount: the total count; 0 if IPDF invalid.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetNamedDest
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.