java.lang.Object
org.sejda.sambox.pdmodel.common.PDPageLabelRange
- All Implemented Interfaces:
COSObjectable
Contains information for a page label range.
- Author:
- Igor Podolskiy
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDecimal page numbering style (1, 2, 3, ...).static final StringLetter (lower case) numbering style (a, b, ..., z, aa, bb, ..., zz, aaa, ...).static final StringLetter (upper case) numbering style (A, B, ..., Z, AA, BB, ..., ZZ, AAA, ...).static final StringRoman numbers (lower case) numbering style (i, ii, iii, iv, ...).static final StringRoman numbers (upper case) numbering style (I, II, III, IV, ...). -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty page label range object.PDPageLabelRange(String style, String prefix, Integer start) Creates a new page label range object from the given dictionary. -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlying dictionary.Returns the page label prefix for this page range.intgetStart()Returns the start value for page numbering in this page range.getStyle()Returns the numbering style for this page range.booleanhasStart()voidSets the page label prefix for this page range.voidsetStart(int start) Sets the start value for page numbering in this page range.voidSets the numbering style for this page range.
-
Field Details
-
STYLE_DECIMAL
Decimal page numbering style (1, 2, 3, ...).- See Also:
-
STYLE_ROMAN_UPPER
Roman numbers (upper case) numbering style (I, II, III, IV, ...).- See Also:
-
STYLE_ROMAN_LOWER
Roman numbers (lower case) numbering style (i, ii, iii, iv, ...).- See Also:
-
STYLE_LETTERS_UPPER
Letter (upper case) numbering style (A, B, ..., Z, AA, BB, ..., ZZ, AAA, ...).- See Also:
-
STYLE_LETTERS_LOWER
Letter (lower case) numbering style (a, b, ..., z, aa, bb, ..., zz, aaa, ...).- See Also:
-
-
Constructor Details
-
PDPageLabelRange
public PDPageLabelRange()Creates a new empty page label range object. -
PDPageLabelRange
Creates a new page label range object from the given dictionary.- Parameters:
dict- the base dictionary for the new object.
-
PDPageLabelRange
-
-
Method Details
-
getCOSObject
Returns the underlying dictionary.- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- the underlying dictionary.
-
getStyle
Returns the numbering style for this page range.- Returns:
- one of the STYLE_* constants
-
setStyle
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.
-
hasStart
public boolean hasStart()- Returns:
- true if the start value for page numbering is defined, false otherwise.
-
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
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
Sets the page label prefix for this page range.- Parameters:
prefix- the page label prefix for this page range, ornullto unset the prefix.
-