PDFium Delphi Component Docs

RefreshAppearance method

Component: TPdf  ·  Unit: PDFium
Force PDFium to regenerate the appearance stream of one annotation

Syntax

procedure RefreshAppearance(AnnotIndex: Integer);

AnnotIndexInteger. Zero-based index of the annotation on the current page. An index that does not resolve is ignored

Description

A PDF viewer paints an annotation from its /AP appearance stream, not from the values in its dictionary. After a change that the dictionary records but the appearance does not yet show - a new field value, a new font colour - the annotation still renders the old way until the appearance is rebuilt

This rebuilds it for one annotation, which is the narrow counterpart of GenerateFormAppearances over every widget on every page

The page is marked as modified, so a following SaveAs writes the regenerated appearance

See Also

GenerateFormAppearances, SetAnnotationFontColor, FormField, UpdateAnnotationObject