Calculating the page number string

When the string is an expression that uses some of the functions, the maximum length required for a page number can be dependent on the page breaks, and vice versa. To make sure that there is enough space available to display any possible page number string, use the properties provided, such as X-size, text, textExpression, or CodeValueExpression, to indicate the maximum length. For example, setting the value of the text property to "000" specifies that the maximum length is 3 digits. The priority for selecting the property to be used is:

  1. X-size
  2. string text
  3. expression evaluation

If none of these properties are set, a default value is used to calculate the maximum length of the string.