PDFium Delphi Component Docs

GetAnnotationFontColor method

Component: TPdf  ·  Unit: PDFium
Read the text colour of a form-field widget annotation.

Syntax

function GetAnnotationFontColor(AnnotIndex: Integer; out Color: TColor): Boolean;

AnnotIndexInteger. Zero-based index of the widget annotation on the current page.
ColorTColor. Receives the font colour when the call succeeds.
ResultBoolean. True when a colour was read; False when the annotation carries none, the form layer is not active, or the PDFium build does not export the entry point.

Description

Reads the colour a widget uses to draw its text, without going through the annotation dictionary and its /DA string

The out parameter stays untouched when the function returns False, so a caller has to check the result rather than the value

Form-field widgets are the annotations this applies to; other subtypes have no font colour to report

See Also

SetAnnotationFontColor, FormField, FormFieldInfo, RefreshAppearance