Class PageCounter


  • public class PageCounter
    extends Object
    Provides state needed for a text flow.
    • Constructor Detail

      • PageCounter

        public PageCounter()
      • PageCounter

        public PageCounter​(PageCounter template)
    • Method Detail

      • setDefaultPageOffset

        public void setDefaultPageOffset​(int value)
      • getDefaultPageOffset

        public int getDefaultPageOffset()
        Page number counter. Represents the current value of the default "page-number-counter" (i.e. the value for the page that was produced last).

        Initially 0, or the value specified with initial-page-number minus 1.

        Returns:
        the counter value
      • getPageCount

        public int getPageCount()
        Simple page counter. Represents the number of pages currently produced. This is used for searching and MUST be continuous. Do not use for page numbers.

        Initially 0.

        Returns:
        the counter value
      • increasePageCount

        public void increasePageCount()
        Advance to the next page. Increments the value of getPageCount() by 1.