API referenceCore SDK

pdfGetNamedDest

Enumerate the document's named destinations by 0-based

C
BOOL32 __stdcall pdfGetNamedDest(PPDF IPDF, uint32_t Index, TPDFNamedDest* Dest);
int32_t __stdcall pdfGetNamedDestCount(PPDF IPDF);
Delphi
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.

ParameterDescription
IPDFDocument handle.
Index0-based index into the document's named-destination list.
DestOutput: 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)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Getters

Exported names

pdfGetNamedDest

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.