SetFormFieldNumberFormat

Form fields

Description

This page describes SetFormFieldNumberFormat in PDFlibPas under the "Form fields" topic. API names, parameters, class names, filenames, and literals are kept exactly as they appear in the Delphi library and DLL entry points.

Review the syntax, parameters, and return values before calling the function.

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.