public class PdfPageLabels
extends java.lang.Object
implements java.util.Comparator
| Modifier and Type | Field and Description |
|---|---|
static int |
DECIMAL_ARABIC_NUMERALS
Logical pages will have the form 1,2,3,...
|
static int |
EMPTY
No logical page numbers are generated but fixed text may
still exist
|
static int |
LOWERCASE_LETTERS
Logical pages will have the form of uppercase letters
(a to z for the first 26 pages, aa to zz for the next 26, and so on)
|
static int |
LOWERCASE_ROMAN_NUMERALS
Logical pages will have the form i,ii,iii,iv,...
|
(package private) java.util.TreeMap |
map
The sequence of logical pages.
|
(package private) static PdfName[] |
numberingStyle
Dictionary values to set the logical page styles
|
static int |
UPPERCASE_LETTERS
Logical pages will have the form of uppercase letters
(A to Z for the first 26 pages, AA to ZZ for the next 26, and so on)
|
static int |
UPPERCASE_ROMAN_NUMERALS
Logical pages will have the form I,II,III,IV,...
|
| Constructor and Description |
|---|
PdfPageLabels()
Creates a new PdfPageLabel with a default logical page 1
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPageLabel(int page,
int numberStyle)
Adds or replaces a page label.
|
void |
addPageLabel(int page,
int numberStyle,
java.lang.String text)
Adds or replaces a page label.
|
void |
addPageLabel(int page,
int numberStyle,
java.lang.String text,
int firstPage)
Adds or replaces a page label.
|
int |
compare(java.lang.Object obj,
java.lang.Object obj1)
Compares two
Integer. |
boolean |
equals(java.lang.Object obj)
Not used
|
(package private) PdfDictionary |
getDictionary()
Gets the page label dictionary to insert into the document.
|
void |
removePageLabel(int page)
Removes a page label.
|
public static int DECIMAL_ARABIC_NUMERALS
public static int UPPERCASE_ROMAN_NUMERALS
public static int LOWERCASE_ROMAN_NUMERALS
public static int UPPERCASE_LETTERS
public static int LOWERCASE_LETTERS
public static int EMPTY
static PdfName[] numberingStyle
java.util.TreeMap map
public PdfPageLabels()
public int compare(java.lang.Object obj,
java.lang.Object obj1)
Integer.compare in interface java.util.Comparatorobj - the first Integerobj1 - the second Integerpublic boolean equals(java.lang.Object obj)
equals in interface java.util.Comparatorequals in class java.lang.Objectobj - not usedtruepublic void addPageLabel(int page,
int numberStyle,
java.lang.String text,
int firstPage)
page - the real page to start the numbering. First page is 1numberStyle - the numbering style such as LOWERCASE_ROMAN_NUMERALStext - the text to prefix the number. Can be null or emptyfirstPage - the first logical page numberpublic void addPageLabel(int page,
int numberStyle,
java.lang.String text)
page - the real page to start the numbering. First page is 1numberStyle - the numbering style such as LOWERCASE_ROMAN_NUMERALStext - the text to prefix the number. Can be null or emptypublic void addPageLabel(int page,
int numberStyle)
page - the real page to start the numbering. First page is 1numberStyle - the numbering style such as LOWERCASE_ROMAN_NUMERALSpublic void removePageLabel(int page)
page - the real page to removePdfDictionary getDictionary()