API referenceAnnotations

pdfSetAnnotIcon

Set a Text (sticky-note) annotation's /Name icon (Comment,

C
BOOL32 __stdcall pdfSetAnnotIcon(PPDF IPDF, uint32_t Handle, TAnnotIcon Icon);
Delphi
function pdfSetAnnotIcon(const IPDF: PPDF; Handle: Cardinal; Icon: TAnnotIcon): LongBool; stdcall;

Purpose. Set a Text (sticky-note) annotation's /Name icon (Comment, Key, Note, Help, NewParagraph, Paragraph, Insert, etc — the standard PDF icon-name set for Text annotations, distinct from pdfSetIconColor's unrelated dead document-global setting, Line Style, Opacity, and Graphics-State Flags).

Parameters.

ParameterDescription
IPDFDocument handle.
HandleDocument-wide annotation handle.
IconStandard icon name enum.

Return value. True if Handle resolves; False otherwise.

C# (P/Invoke)

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

Annotations

Exported names

pdfSetAnnotIcon

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.