RegenerateDirtyFormAppearances

Form fields, performance

Description

Regenerates only the deduplicated visible Widget appearances changed during the current document session

Syntax

Delphi

Function TPDFlib.RegenerateDirtyFormAppearances: Integer;

Return values

0No tracked Widget appearance was regenerated
Positive valueThe number of Widget appearance streams regenerated successfully

Remarks

The work scales with the changed Widget set instead of the total form field count, making this call suitable for large forms and batched value updates

Successful entries leave the dirty set, failed entries remain pending, and NeedAppearances becomes false only when no pending entry remains

A typical batch sets NeedAppearances to 1, changes field values, optionally calls RecalculateFormFields, then calls this function before saving

This current-session tracker does not discover missing appearances already present in a loaded document; use RegenerateFormAppearances for that complete scan

Example

Lib.SetNeedAppearances(1);
Lib.SetFormFieldValue(InputField, '42');
Lib.RecalculateFormFields(InputField);
Refreshed:= Lib.RegenerateDirtyFormAppearances;

See also

GetDirtyFormAppearanceCount, RegenerateFormAppearances, RecalculateFormFields