SetNeedAppearances
Form fields
Description
Sets the document's NeedAppearances value for AcroForm appearance handling
Set the value to 1 while batching field changes so the library records changed Widget appearances without regenerating each one immediately, then call RegenerateDirtyFormAppearances before saving
Set the value to 0 to request immediate appearance regeneration after each supported field change
The document must have at least one form field for this function to have any effect
Syntax
Delphi
Function TPDFlib.SetNeedAppearances(NewValue: Integer): Integer;
ActiveX
Function PDFlib::SetNeedAppearances(NewValue As Long) As Long
DLL
int DLSetNeedAppearances(int InstanceID, int NewValue);
Parameters
| NewValue | 0 sets NeedAppearances to false; 1 sets it to true |
|---|
Return values
| 0 | The document does not have any form fields |
|---|---|
| 1 | The NeedAppearances value was set successfully |
Remarks
PDF 2.0 requires appearance streams for Widget annotations and deprecates relying on NeedAppearances; regenerate pending appearances before producing PDF 2.0 output
The current-session dirty tracker cannot discover appearances already missing from a loaded document, so use RegenerateFormAppearances for a complete imported-document pass
See also
GetDirtyFormAppearanceCount, RegenerateDirtyFormAppearances, RegenerateFormAppearances