axf:field-format

(Auszug aus "XSL-FO ― Die Referenz" von Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Category Acroform in PDF Output

Specifies the format of the text field. [no-LT]

Value:auto | [ [<string> | <number>] [<string> | <number> | true | false]* ]
Initial:auto
Applies to:axf:form-field
Inherited:no
Percentages:N/A

The setting of the format will differ depending on the type of formats specified by axf:field-format-category. When auto is specified, the default is adopted to all values. In other cases, values of axf:field-format-category can be specified as follows:

numberValues can be specified with a maximum of 5 as follows:
axf:field-format="2 0 1 '$ ' true"
These values have the following meanings in sequence.
  1. The number of digits after the decimal point. (default: 2)

    When the inputted value has many digit numbers after the decimal point, it is displayed by rounding off.

  2. How to display numbers with different separators. One of the following values can be specified. (default: 0)
    0.1,234.56
    1. 1234.56
    2.1.234,56
    3. 1234,56
    4.1'234.56
  3. How to display negative numbers. (default: 0)
    0.No processing.
    1.Display in red.
    2.Display with parentheses.
    3.Display in red with parentheses.
  4. Currency symbol. Any character strings can be specified. (default: empty)

    When putting a currency symbol before numbers, it's better to put a white space after numbers like "$ ". When putting it after the numbers, put the white space before numbers.

  5. Position of a currency symbol. If true is specified, it is displayed before numbers, if false is specified, it is displayed after numbers. (default: true)

percentageValues can be specified with a maximum of 2 as follows:
axf:field-format="2 0"
Values have the same meaning as number.
dateSpecifies the format by the numerical value or character strings. One of the following numerical values can be specified. (default: 0)
0.m/d
1.m/d/yy
2.mm/dd/yy
3.mm/yy
4.d-mmm
5.d-mmm-yy
6.dd-mmm-yy
7.yy-mm-dd
8.mmm-yy
9.mmmm-yy
10.mmm d, yyyy
11.mmmm d, yyyy
12.m/d/yy h:MM tt
13.m/d/yy HH:MM
The following 2 settings have the same meaning.
axf:field-format="2"
axf:field-format="'mm/dd/yy'"
Although an arbitrary format can be specified in the character string, the operation when specifying the mistaken format will not be guaranteed. Please refer to the specifications of JavaScript, etc. to learn the meaning of the character in the format.
timeSpecifies the format by the numerical value or character strings. One of the following numerical values can be specified. (default: 0)
0.HH:MM
1.h:MM tt
2.HH:MM:ss
3.h:MM:ss tt
The following 2 settings have the same meaning.
axf:field-format="0"
axf:field-format="'HH:MM'"
Although an arbitrary format can be specified in the character string, the operation when specifying the mistaken format will not be guaranteed. Please refer to the specifications of JavaScript, etc. to learn the meaning of the character in the format.
CAUTION:The specified format might be invalid depending on the version of Acrobat.
Tipp der data2type-Redaktion:
Zum Thema XSL-FO bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an: