PDFium Delphi Component Docs

SetAnnotationFontColor method

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

Syntax

function SetAnnotationFontColor(AnnotIndex: Integer; Color: TColor): Boolean;

AnnotIndexInteger. Zero-based index of the widget annotation on the current page
ColorTColor. New font colour
ResultBoolean. True when the colour was written, False when the annotation or the PDFium build does not support it

Description

Sets the colour a widget draws its text in, without editing the annotation dictionary directly

The stored appearance stream is what a viewer paints, so call RefreshAppearance or GenerateFormAppearances afterwards for the new colour to show

Returning False leaves the annotation unchanged

See Also

GetAnnotationFontColor, RefreshAppearance, GenerateFormAppearances, FormField