Class PDPageLabelRange
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.common.PDPageLabelRange
-
- All Implemented Interfaces:
COSObjectable
public class PDPageLabelRange extends Object implements COSObjectable
Contains information for a page label range.- See Also:
PDPageLabels
-
-
Field Summary
Fields Modifier and Type Field Description static StringSTYLE_DECIMALDecimal page numbering style (1, 2, 3, ...).static StringSTYLE_LETTERS_LOWERLetter (lower case) numbering style (a, b, ..., z, aa, bb, ..., zz, aaa, ...).static StringSTYLE_LETTERS_UPPERLetter (upper case) numbering style (A, B, ..., Z, AA, BB, ..., ZZ, AAA, ...).static StringSTYLE_ROMAN_LOWERRoman numbers (lower case) numbering style (i, ii, iii, iv, ...).static StringSTYLE_ROMAN_UPPERRoman numbers (upper case) numbering style (I, II, III, IV, ...).
-
Constructor Summary
Constructors Constructor Description PDPageLabelRange()Creates a new empty page label range object.PDPageLabelRange(COSDictionary dict)Creates a new page label range object from the given dictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description COSDictionarygetCOSObject()Returns the underlying dictionary.StringgetPrefix()Returns the page label prefix for this page range.intgetStart()Returns the start value for page numbering in this page range.StringgetStyle()Returns the numbering style for this page range.voidsetPrefix(String prefix)Sets the page label prefix for this page range.voidsetStart(int start)Sets the start value for page numbering in this page range.voidsetStyle(String style)Sets the numbering style for this page range.
-
-
-
Field Detail
-
STYLE_DECIMAL
public static final String STYLE_DECIMAL
Decimal page numbering style (1, 2, 3, ...).- See Also:
- Constant Field Values
-
STYLE_ROMAN_UPPER
public static final String STYLE_ROMAN_UPPER
Roman numbers (upper case) numbering style (I, II, III, IV, ...).- See Also:
- Constant Field Values
-
STYLE_ROMAN_LOWER
public static final String STYLE_ROMAN_LOWER
Roman numbers (lower case) numbering style (i, ii, iii, iv, ...).- See Also:
- Constant Field Values
-
STYLE_LETTERS_UPPER
public static final String STYLE_LETTERS_UPPER
Letter (upper case) numbering style (A, B, ..., Z, AA, BB, ..., ZZ, AAA, ...).- See Also:
- Constant Field Values
-
STYLE_LETTERS_LOWER
public static final String STYLE_LETTERS_LOWER
Letter (lower case) numbering style (a, b, ..., z, aa, bb, ..., zz, aaa, ...).- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PDPageLabelRange
public PDPageLabelRange()
Creates a new empty page label range object.
-
PDPageLabelRange
public PDPageLabelRange(COSDictionary dict)
Creates a new page label range object from the given dictionary.- Parameters:
dict- the base dictionary for the new object.
-
-
Method Detail
-
getCOSObject
public COSDictionary getCOSObject()
Returns the underlying dictionary.- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- the underlying dictionary.
-
getStyle
public String getStyle()
Returns the numbering style for this page range.- Returns:
- one of the STYLE_* constants
-
setStyle
public void setStyle(String style)
Sets the numbering style for this page range.- Parameters:
style- one of the STYLE_* constants ornullif no page numbering is desired.
-
getStart
public int getStart()
Returns the start value for page numbering in this page range.- Returns:
- a positive integer the start value for numbering.
-
setStart
public void setStart(int start)
Sets the start value for page numbering in this page range.- Parameters:
start- a positive integer representing the start value.- Throws:
IllegalArgumentException- ifstartis not a positive integer
-
getPrefix
public String getPrefix()
Returns the page label prefix for this page range.- Returns:
- the page label prefix for this page range, or
nullif no prefix has been defined.
-
setPrefix
public void setPrefix(String prefix)
Sets the page label prefix for this page range.- Parameters:
prefix- the page label prefix for this page range, ornullto unset the prefix.
-
-