Package org.apache.fop.pdf
Class PDFPageLabels
- java.lang.Object
-
- org.apache.fop.pdf.PDFObject
-
- org.apache.fop.pdf.PDFDictionary
-
- org.apache.fop.pdf.PDFNumberTreeNode
-
- org.apache.fop.pdf.PDFPageLabels
-
- All Implemented Interfaces:
CompressedObject,PDFWritable
public class PDFPageLabels extends PDFNumberTreeNode
Class representing a PDF /PageLabels dictionary.
-
-
Field Summary
Fields Modifier and Type Field Description private static intDECIMALprivate intlastPageLabelTypeprivate intlastPageNumberprivate java.lang.StringlastZeroPaddingPrefixprivate static intLOWER_ALPHAprivate static intLOWER_ROMANprivate static java.util.regex.PatternMATCH_DECIMALprivate static java.util.regex.PatternMATCH_LETTERprivate static java.util.regex.PatternMATCH_ROMANprivate static intPREFIXprivate static PDFNameS_DECIMALprivate static PDFNameS_LOWER_ALPHAprivate static PDFNameS_LOWER_ROMANprivate static PDFNameS_UPPER_ALPHAprivate static PDFNameS_UPPER_ROMANprivate static intUPPER_ALPHAprivate static intUPPER_ROMAN-
Fields inherited from class org.apache.fop.pdf.PDFDictionary
entries, order
-
-
Constructor Summary
Constructors Constructor Description PDFPageLabels()Create the /PageLabels dictionary
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPageLabel(int index, java.lang.String pageLabel)Adds a new entry, if necessary, to the /PageLabels dictionary.private intalphabeticToArabic(char c)private intromanToArabic(java.lang.String roman)-
Methods inherited from class org.apache.fop.pdf.PDFNumberTreeNode
addToNums, getKids, getLowerLimit, getNums, getUpperLimit, setKids, setLowerLimit, setNums, setUpperLimit
-
Methods inherited from class org.apache.fop.pdf.PDFDictionary
containsKey, get, getChildren, getChildren, keySet, output, put, put, remove, writeDictionary
-
Methods inherited from class org.apache.fop.pdf.PDFObject
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, supportsObjectStream, toPDF, toPDFString
-
-
-
-
Field Detail
-
DECIMAL
private static final int DECIMAL
- See Also:
- Constant Field Values
-
LOWER_ALPHA
private static final int LOWER_ALPHA
- See Also:
- Constant Field Values
-
UPPER_ALPHA
private static final int UPPER_ALPHA
- See Also:
- Constant Field Values
-
LOWER_ROMAN
private static final int LOWER_ROMAN
- See Also:
- Constant Field Values
-
UPPER_ROMAN
private static final int UPPER_ROMAN
- See Also:
- Constant Field Values
-
PREFIX
private static final int PREFIX
- See Also:
- Constant Field Values
-
S_DECIMAL
private static final PDFName S_DECIMAL
-
S_UPPER_ROMAN
private static final PDFName S_UPPER_ROMAN
-
S_LOWER_ROMAN
private static final PDFName S_LOWER_ROMAN
-
S_UPPER_ALPHA
private static final PDFName S_UPPER_ALPHA
-
S_LOWER_ALPHA
private static final PDFName S_LOWER_ALPHA
-
MATCH_DECIMAL
private static final java.util.regex.Pattern MATCH_DECIMAL
-
MATCH_ROMAN
private static final java.util.regex.Pattern MATCH_ROMAN
-
MATCH_LETTER
private static final java.util.regex.Pattern MATCH_LETTER
-
lastPageLabelType
private int lastPageLabelType
-
lastPageNumber
private int lastPageNumber
-
lastZeroPaddingPrefix
private java.lang.String lastZeroPaddingPrefix
-
-
Method Detail
-
addPageLabel
public void addPageLabel(int index, java.lang.String pageLabel)Adds a new entry, if necessary, to the /PageLabels dictionary.- Parameters:
index- the page index (0 for page 1)pageLabel- the page number as a string
-
romanToArabic
private int romanToArabic(java.lang.String roman)
-
alphabeticToArabic
private int alphabeticToArabic(char c)
-
-