com.lowagie.text.pdf
public class PdfPageLabels extends Object
Nested Class Summary | |
---|---|
static class | PdfPageLabels.PdfPageLabelFormat |
Field Summary | |
---|---|
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,... |
HashMap | map The sequence of logical pages. |
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 Summary | |
---|---|
PdfPageLabels() Creates a new PdfPageLabel with a default logical page 1 |
Method Summary | |
---|---|
void | addPageLabel(int page, int numberStyle, String text, int firstPage) Adds or replaces a page label. |
void | addPageLabel(int page, int numberStyle, String text) Adds or replaces a page label. |
void | addPageLabel(int page, int numberStyle) Adds or replaces a page label. |
void | addPageLabel(PdfPageLabels.PdfPageLabelFormat format) Adds or replaces a page label. |
PdfDictionary | getDictionary(PdfWriter writer) Gets the page label dictionary to insert into the document. |
static PdfPageLabels.PdfPageLabelFormat[] | getPageLabelFormats(PdfReader reader)
Retrieves the page labels from a PDF as an array of PdfPageLabelFormat objects. |
static String[] | getPageLabels(PdfReader reader)
Retrieves the page labels from a PDF as an array of String objects. |
void | removePageLabel(int page) Removes 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
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
Parameters: page the real page to start the numbering. First page is 1 numberStyle the numbering style such as LOWERCASE_ROMAN_NUMERALS
Returns: the page label dictionary
Parameters: reader a PdfReader object that has the page labels you want to retrieve
Returns: a PdfPageLabelEntry array, containing an entry for each format change
or null
if no page labels are present
Parameters: reader a PdfReader object that has the page labels you want to retrieve
Returns: a String array or null
if no page labels are present
Parameters: page the real page to remove