org.apache.fop.fo.pagination

## Class PageNumberGenerator

- java.lang.Object
- - org.apache.fop.fo.pagination.PageNumberGenerator

    public class PageNumberGenerator
    extends Object

This class uses the 'format', 'groupingSeparator', 'groupingSize', and 'letterValue' properties on fo:page-sequence to return a String corresponding to the supplied integer page number.

In addition, (now) uses 'language' parameter and new 'fox:page-number-features' parameter to express applicable language and number conversion features.

This work was authored by Glenn Adams (gadams@apache.org), based on a rewrite of prior work to use the new `NumberConverter` utility class.

See Also:
  `NumberConverter`

### Constructor Summary

Constructors
Constructor and Description
`PageNumberGenerator(String format, int groupingSeparator, int groupingSize, int letterValue, String features, String language, String country)` Main constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `makeFormattedPageNumber(int number)` Formats a page number.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PageNumberGenerator

    public PageNumberGenerator(String format,
                               int groupingSeparator,
                               int groupingSize,
                               int letterValue,
                               String features,
                               String language,
                               String country)

Main constructor. For further information on the parameters see `NumberConverter`.

Parameters:
  `format` - format for the page number (may be null or empty, which is treated as null)
  `groupingSeparator` - grouping separator (if zero, then no grouping separator applies)
  `groupingSize` - grouping size (if zero or negative, then no grouping size applies)
  `letterValue` - letter value
  `features` - features (feature sub-parameters)
  `language` - (may be null or empty, which is treated as null)
  `country` - (may be null or empty, which is treated as null)

### Method Detail

#### makeFormattedPageNumber

    public String makeFormattedPageNumber(int number)

Formats a page number.

Parameters:
  `number` - page number to format
Returns:
  the formatted page number as a String