API referenceGraphics

pdfSetIconColor

Set/get a document-global default icon color, presumably

C
int32_t __stdcall pdfGetIconColor(PPDF IPDF);
BOOL32 __stdcall pdfSetIconColor(PPDF IPDF, uint32_t Color);
Delphi
function pdfGetIconColor(const IPDF: PPDF): Integer; stdcall;
function pdfSetIconColor(const IPDF: PPDF; Color: Cardinal): LongBool; stdcall;

Purpose. Set/get a document-global default icon color, presumably intended for markup-annotation icon glyphs (Note, Comment, etc.).

Description. Verified write-only no-op, same class as pdfSetOpacity/pdfSetDrawDirection above. Stores Color into FIconColor (default $0099FFFF, diverging from the classic API's default); FIconColor is read only by this getter — no annotation-creation code path (pdfTextAnnot, or any other icon-bearing annotation constructor) consults it. Annotation icon color, if supported at all, must be supplied directly through the annotation's own creation parameters rather than this global.

Parameters.

ParameterDescription
IPDFDocument handle.
ColorPacked color value; stored but never applied to any annotation.

Return value. pdfSetIconColor: True if IPDF is valid. pdfGetIconColor: the last stored value (as a signed Integer reinterpretation of the packed Cardinal), or the $0099FFFF default if never set; 0 if IPDF invalid.

See also. pdfSetDrawDirection.

C# (P/Invoke)

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

Setters

Exported names

pdfSetIconColor

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.