SetFormFieldNumberFormat
Form fields
Description
Gives a form field Acrobat number formatting by writing AFNumber_Keystroke / AFNumber_Format onto its additional actions, so viewers filter keystrokes and render the value with the requested decimal places, separators, negative style and currency text. Returns 1 on success, or 0 when the field does not exist or Decimals, SepStyle, NegStyle or CurrencyPrepend is out of range.
Syntax
Delphi
Function TPDFlib.SetFormFieldNumberFormat(Index, Decimals, SepStyle, NegStyle: Integer; Const CurrencyText: WideString; CurrencyPrepend: Integer): Integer;
Parameters
Index is the 1-based field index. Decimals (0..10) sets the displayed decimal places. SepStyle: 0 = 1,234.56; 1 = 1234.56; 2 = 1.234,56; 3 = 1234,56. NegStyle: 0 = minus sign; 1 = red; 2 = parentheses; 3 = red parentheses. CurrencyText is the currency symbol; CurrencyPrepend 1 places it before the number, 0 after.
Return Values
Returns 1 on success, or 0 when the field does not exist or a selector is out of range.
Remarks
Writes the standard Acrobat formatting pair AFNumber_Keystroke/AFNumber_Format onto the field's additional actions (/K and /F), so conforming viewers filter keystrokes and render the formatted value.