/** Adds or replaces a page label. The first logical page has the default * of 1. * @param page the real page to start the numbering. First page is 1 * @param numberStyle the numbering style such as LOWERCASE_ROMAN_NUMERALS * @param text the text to prefix the number. Can be <CODE>null</CODE> or empty */ public void addPageLabel(int page, int numberStyle, String text) { addPageLabel(page, numberStyle, text, 1); }
/** * Adds or replaces a page label. The first logical page has the default of 1. * * @param page * the real page to start the numbering. First page is 1 * @param numberStyle * the numbering style such as LOWERCASE_ROMAN_NUMERALS * @param text * the text to prefix the number. Can be <CODE>null</CODE> or empty */ public void addPageLabel(int page, int numberStyle, String text) { addPageLabel(page, numberStyle, text, 1); }
/** * Adds or replaces a page label. */ public void addPageLabel(PdfPageLabelFormat format) { addPageLabel(format.physicalPage, format.numberStyle, format.prefix, format.logicalPage); }
/** Adds or replaces a page label. There is no text prefix and the first * logical page has the default of 1. * @param page the real page to start the numbering. First page is 1 * @param numberStyle the numbering style such as LOWERCASE_ROMAN_NUMERALS */ public void addPageLabel(int page, int numberStyle) { addPageLabel(page, numberStyle, null, 1); }
/** Adds or replaces a page label. */ public void addPageLabel(PdfPageLabelFormat format) { addPageLabel(format.physicalPage, format.numberStyle, format.prefix, format.logicalPage); }
/** * Adds or replaces a page label. There is no text prefix and the first logical page has the * default of 1. * * @param page * the real page to start the numbering. First page is 1 * @param numberStyle * the numbering style such as LOWERCASE_ROMAN_NUMERALS */ public void addPageLabel(int page, int numberStyle) { addPageLabel(page, numberStyle, null, 1); }
/** Adds or replaces a page label. The first logical page has the default * of 1. * @param page the real page to start the numbering. First page is 1 * @param numberStyle the numbering style such as LOWERCASE_ROMAN_NUMERALS * @param text the text to prefix the number. Can be <CODE>null</CODE> or empty */ public void addPageLabel(int page, int numberStyle, String text) { addPageLabel(page, numberStyle, text, 1); }
/** Adds or replaces a page label. There is no text prefix and the first * logical page has the default of 1. * @param page the real page to start the numbering. First page is 1 * @param numberStyle the numbering style such as LOWERCASE_ROMAN_NUMERALS */ public void addPageLabel(int page, int numberStyle) { addPageLabel(page, numberStyle, null, 1); }
/** Adds or replaces a page label. */ public void addPageLabel(PdfPageLabelFormat format) { addPageLabel(format.physicalPage, format.numberStyle, format.prefix, format.logicalPage); }
/** Creates a new PdfPageLabel with a default logical page 1 */ public PdfPageLabels() { map = new HashMap(); addPageLabel(1, DECIMAL_ARABIC_NUMERALS, null, 1); }
/** * Creates a new PdfPageLabel with a default logical page 1 */ public PdfPageLabels() { map = new HashMap(); addPageLabel(1, PdfPageLabels.DECIMAL_ARABIC_NUMERALS, null, 1); }
/** Creates a new PdfPageLabel with a default logical page 1 */ public PdfPageLabels() { map = new HashMap(); addPageLabel(1, DECIMAL_ARABIC_NUMERALS, null, 1); }
/** * Maps a map of {@link PdfPageLabel} to a {@link com.lowagie.text.pdf.PdfPageLabels} instance that can be used as input for the PdfCopy. * * @param labels * @param totalPages * @return the resulting {@link PdfPageLabels} */ public static PdfPageLabels getLabels(Map<Integer, PdfPageLabel> labels, int totalPages) { PdfPageLabels retVal = new PdfPageLabels(); for (Entry<Integer, PdfPageLabel> entry : labels.entrySet()) { PdfPageLabel label; if (entry.getKey() <= totalPages) { label = entry.getValue(); retVal.addPageLabel(entry.getKey(), PAGE_NUMBERS_STYLES.get(label.getNumberingStyle()), label.getLabelPrefix(), label.getLogicalPageNumber()); } else { LOG.warn("Page number out of rage, {} will be ignored.", entry.getValue()); } } return retVal; } }