API referenceAnnotations

pdfChangeAnnotName

Set an annotation's /NM (name/identifier) string.

C
BOOL32 __stdcall pdfChangeAnnotNameA(PPDF IPDF, uint32_t Handle, const char* Name);
BOOL32 __stdcall pdfChangeAnnotNameW(PPDF IPDF, uint32_t Handle, const wchar_t* Name);
Delphi
function pdfChangeAnnotNameA(const IPDF: PPDF; Handle: Cardinal; const Name: PAnsiChar): LongBool; stdcall;
function pdfChangeAnnotNameW(const IPDF: PPDF; Handle: Cardinal; const Name: PWideChar): LongBool; stdcall;

Purpose. Set an annotation's /NM (name/identifier) string.

Parameters.

ParameterDescription
IPDFDocument handle.
HandleDocument-wide annotation handle.
NameNew /NM value. W is text-encoded via the same wide-string path used throughout this SDK (PWideToPdfText); A is raw bytes.

Return value. True if Handle resolves; False otherwise.

C# (P/Invoke)

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

Core

Exported names

pdfChangeAnnotNameA pdfChangeAnnotNameW

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.