Class PdfPageLabels


  • class PdfPageLabels
    extends java.lang.Object
    Page labels are used to identify each page visually on the screen or in print.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int DECIMAL_ARABIC_NUMERALS
      Logical pages will have the form 1,2,3,...
      private java.util.HashMap map
      The sequence of logical pages.
      private static PdfName[] numberingStyle
      Dictionary values to set the logical page styles
    • Constructor Summary

      Constructors 
      Constructor Description
      PdfPageLabels()
      Creates a new PdfPageLabel with a default logical page 1
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addPageLabel​(int page, int numberStyle, java.lang.String text, int firstPage)
      Adds or replaces a page label.
      (package private) PdfDictionary getDictionary​(PdfWriter writer)
      Gets the page label dictionary to insert into the document.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DECIMAL_ARABIC_NUMERALS

        private static final int DECIMAL_ARABIC_NUMERALS
        Logical pages will have the form 1,2,3,...
        See Also:
        Constant Field Values
      • numberingStyle

        private static PdfName[] numberingStyle
        Dictionary values to set the logical page styles
      • map

        private final java.util.HashMap map
        The sequence of logical pages. Will contain at least a value for page 1
    • Constructor Detail

      • PdfPageLabels

        public PdfPageLabels()
        Creates a new PdfPageLabel with a default logical page 1
    • Method Detail

      • addPageLabel

        private void addPageLabel​(int page,
                                  int numberStyle,
                                  java.lang.String text,
                                  int firstPage)
        Adds or replaces a page label.
        Parameters:
        page - the real page to start the numbering. First page is 1
        numberStyle - the numbering style such as LOWERCASE_ROMAN_NUMERALS
        text - the text to prefix the number. Can be null or empty
        firstPage - the first logical page number
      • getDictionary

        PdfDictionary getDictionary​(PdfWriter writer)
        Gets the page label dictionary to insert into the document.
        Returns:
        the page label dictionary