| java.lang.Object com.lowagie.text.pdf.PdfPageLabels
PdfPageLabels | public class PdfPageLabels (Code) | | Page labels are used to identify each
page visually on the screen or in print.
author: Paulo Soares (psoares@consiste.pt) |
Inner Class :public static class PdfPageLabelFormat | |
Field Summary | |
final public static int | DECIMAL_ARABIC_NUMERALS Logical pages will have the form 1,2,3,... | final public static int | EMPTY | final public static int | LOWERCASE_LETTERS | final public static int | LOWERCASE_ROMAN_NUMERALS Logical pages will have the form i,ii,iii,iv,... | final public static int | UPPERCASE_LETTERS | final public static int | UPPERCASE_ROMAN_NUMERALS Logical pages will have the form I,II,III,IV,... | static PdfName | numberingStyle |
Method Summary | |
public void | addPageLabel(int page, int numberStyle, String text, int firstPage) Adds or replaces a page label.
Parameters: page - the real page to start the numbering. | public void | addPageLabel(int page, int numberStyle, String text) Adds or replaces a page label. | public void | addPageLabel(int page, int numberStyle) Adds or replaces a page label. | public void | addPageLabel(PdfPageLabelFormat format) Adds or replaces a page label. | PdfDictionary | getDictionary(PdfWriter writer) Gets the page label dictionary to insert into the document. | public static PdfPageLabelFormat[] | getPageLabelFormats(PdfReader reader) Retrieves the page labels from a PDF as an array of
PdfPageLabelFormat objects. | public static String[] | getPageLabels(PdfReader reader) Retrieves the page labels from a PDF as an array of String objects. | public void | removePageLabel(int page) Removes a page label. |
DECIMAL_ARABIC_NUMERALS | final public static int DECIMAL_ARABIC_NUMERALS(Code) | | Logical pages will have the form 1,2,3,...
|
EMPTY | final public static int EMPTY(Code) | | No logical page numbers are generated but fixed text may
still exist
|
LOWERCASE_LETTERS | final public static int LOWERCASE_LETTERS(Code) | | 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)
|
LOWERCASE_ROMAN_NUMERALS | final public static int LOWERCASE_ROMAN_NUMERALS(Code) | | Logical pages will have the form i,ii,iii,iv,...
|
UPPERCASE_LETTERS | final public static int UPPERCASE_LETTERS(Code) | | 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)
|
UPPERCASE_ROMAN_NUMERALS | final public static int UPPERCASE_ROMAN_NUMERALS(Code) | | Logical pages will have the form I,II,III,IV,...
|
numberingStyle | static PdfName numberingStyle(Code) | | Dictionary values to set the logical page styles
|
PdfPageLabels | public PdfPageLabels()(Code) | | Creates a new PdfPageLabel with a default logical page 1
|
addPageLabel | public void addPageLabel(int page, int numberStyle, String text, int firstPage)(Code) | | Adds or replaces a page label.
Parameters: page - the real page to start the numbering. First page is 1 Parameters: numberStyle - the numbering style such as LOWERCASE_ROMAN_NUMERALS Parameters: text - the text to prefix the number. Can be null or empty Parameters: firstPage - the first logical page number |
addPageLabel | public void addPageLabel(int page, int numberStyle, String text)(Code) | | Adds or replaces a page label. The first logical page has the default
of 1.
Parameters: page - the real page to start the numbering. First page is 1 Parameters: numberStyle - the numbering style such as LOWERCASE_ROMAN_NUMERALS Parameters: text - the text to prefix the number. Can be null or empty |
addPageLabel | public void addPageLabel(int page, int numberStyle)(Code) | | Adds or replaces a page label. There is no text prefix and the first
logical page has the default of 1.
Parameters: page - the real page to start the numbering. First page is 1 Parameters: numberStyle - the numbering style such as LOWERCASE_ROMAN_NUMERALS |
addPageLabel | public void addPageLabel(PdfPageLabelFormat format)(Code) | | Adds or replaces a page label.
|
getDictionary | PdfDictionary getDictionary(PdfWriter writer)(Code) | | Gets the page label dictionary to insert into the document.
the page label dictionary |
getPageLabelFormats | public static PdfPageLabelFormat[] getPageLabelFormats(PdfReader reader)(Code) | | Retrieves the page labels from a PDF as an array of
PdfPageLabelFormat objects.
Parameters: reader - a PdfReader object that has the page labels you want to retrieve a PdfPageLabelEntry array, containing an entry for each format changeor null if no page labels are present |
getPageLabels | public static String[] getPageLabels(PdfReader reader)(Code) | | Retrieves the page labels from a PDF as an array of String objects.
Parameters: reader - a PdfReader object that has the page labels you want to retrieve a String array or null if no page labels are present |
removePageLabel | public void removePageLabel(int page)(Code) | | Removes a page label. The first page label can not be removed, only changed.
Parameters: page - the real page to remove |
|
|