API referenceCore SDK

pdfDeleteNamedDest

Delete a named destination, by name or by index.

C
BOOL32 __stdcall pdfDeleteNamedDestA(PPDF IPDF, const char* Name);
BOOL32 __stdcall pdfDeleteNamedDestW(PPDF IPDF, const wchar_t* Name);
BOOL32 __stdcall pdfDeleteNamedDestByIndex(PPDF IPDF, int32_t Index);
Delphi
function pdfDeleteNamedDestA(const IPDF: PPDF; const Name: PAnsiChar): LongBool; stdcall;
function pdfDeleteNamedDestW(const IPDF: PPDF; const Name: PWideChar): LongBool; stdcall;
function pdfDeleteNamedDestByIndex(const IPDF: PPDF; Index: Integer): LongBool; stdcall;

Purpose. Delete a named destination, by name or by index.

Description. Because named-destination keys are stored as byte strings, pdfDeleteNamedDestW narrows its wide Name to the default ANSI codepage before matching — an explicit, deliberate source comment confirms this mirrors the same narrowing convention used at creation time (pdfCreateNamedDest, Actions & Named Destinations), so a name created via the W creation path and deleted via the W deletion path round-trips consistently, as long as the name is representable in the system codepage; a name containing characters outside that codepage cannot be reliably deleted by name (only by index).

Parameters.

ParameterDescription
IPDFDocument handle.
NameThe destination's name (narrowed to ANSI codepage for matching, both A and W).
Index*(ByIndex only)* 0-based index.

Return value. True if the destination was found and removed; False otherwise.

C# (P/Invoke)

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

Core

Exported names

pdfDeleteNamedDestA pdfDeleteNamedDestW

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.