Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.common

public Class PDPageLabelRange

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
org.apache.pdfbox.cos.COSDictionary, .COSName

Contains information for a page label range.
Author
Igor Podolskiy
See Also
PDPageLabels

Field Summary

Modifier and TypeField and Description
private static final COSName
private static final COSName
private static final COSName
private final COSDictionary
public static final String
STYLE_DECIMAL

Decimal page numbering style (1, 2, 3, ...).

public static final String
STYLE_LETTERS_LOWER

Letter (lower case) numbering style (a, b, ..., z, aa, bb, ..., zz, aaa, ...).

public static final String
STYLE_LETTERS_UPPER

Letter (upper case) numbering style (A, B, ..., Z, AA, BB, ..., ZZ, AAA, ...).

public static final String
STYLE_ROMAN_LOWER

Roman numbers (lower case) numbering style (i, ii, iii, iv, ...).

public static final String
STYLE_ROMAN_UPPER

Roman numbers (upper case) numbering style (I, II, III, IV, ...).

Constructor Summary

AccessConstructor and Description
public
PDPageLabelRange()

Creates a new empty page label range object.

public
PDPageLabelRange(COSDictionary
the base dictionary for the new object.
dict
)

Creates a new page label range object from the given dictionary.

Method Summary

Modifier and TypeMethod and Description
public COSDictionary

Returns:

the underlying dictionary.
getCOSObject
()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Returns the underlying dictionary.

public String

Returns:

the page label prefix for this page range, or null if no prefix has been defined.
getPrefix
()

Returns the page label prefix for this page range.

public int

Returns:

a positive integer the start value for numbering.
getStart
()

Returns the start value for page numbering in this page range.

public String

Returns:

one of the STYLE_* constants
getStyle
()

Returns the numbering style for this page range.

public void
setPrefix(String
the page label prefix for this page range, or null to unset the prefix.
prefix
)

Sets the page label prefix for this page range.

public void
setStart(int
a positive integer representing the start value.
start
)

Sets the start value for page numbering in this page range.

public void
setStyle(String
one of the STYLE_* constants or null if no page numbering is desired.
style
)

Sets the numbering style for this page range.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

KEY_PREFIXback to summary
private static final COSName KEY_PREFIX
KEY_STARTback to summary
private static final COSName KEY_START
KEY_STYLEback to summary
private static final COSName KEY_STYLE
rootback to summary
private final COSDictionary root
STYLE_DECIMALback to summary
public static final String STYLE_DECIMAL

Decimal page numbering style (1, 2, 3, ...).

STYLE_LETTERS_LOWERback to summary
public static final String STYLE_LETTERS_LOWER

Letter (lower case) numbering style (a, b, ..., z, aa, bb, ..., zz, aaa, ...).

STYLE_LETTERS_UPPERback to summary
public static final String STYLE_LETTERS_UPPER

Letter (upper case) numbering style (A, B, ..., Z, AA, BB, ..., ZZ, AAA, ...).

STYLE_ROMAN_LOWERback to summary
public static final String STYLE_ROMAN_LOWER

Roman numbers (lower case) numbering style (i, ii, iii, iv, ...).

STYLE_ROMAN_UPPERback to summary
public static final String STYLE_ROMAN_UPPER

Roman numbers (upper case) numbering style (I, II, III, IV, ...).

Constructor Detail

PDPageLabelRangeback to summary
public PDPageLabelRange()

Creates a new empty page label range object.

PDPageLabelRangeback to summary
public PDPageLabelRange(COSDictionary dict)

Creates a new page label range object from the given dictionary.

Parameters
dict:COSDictionary

the base dictionary for the new object.

Method Detail

getCOSObjectback to summary
public COSDictionary getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Returns the underlying dictionary.

Returns:COSDictionary

the underlying dictionary.

Annotations
@Override
getPrefixback to summary
public String getPrefix()

Returns the page label prefix for this page range.

Returns:String

the page label prefix for this page range, or null if no prefix has been defined.

getStartback to summary
public int getStart()

Returns the start value for page numbering in this page range.

Returns:int

a positive integer the start value for numbering.

getStyleback to summary
public String getStyle()

Returns the numbering style for this page range.

Returns:String

one of the STYLE_* constants

setPrefixback to summary
public void setPrefix(String prefix)

Sets the page label prefix for this page range.

Parameters
prefix:String

the page label prefix for this page range, or null to unset the prefix.

setStartback to summary
public void setStart(int start)

Sets the start value for page numbering in this page range.

Parameters
start:int

a positive integer representing the start value.

Exceptions
IllegalArgumentException:
if start is not a positive integer
setStyleback to summary
public void setStyle(String style)

Sets the numbering style for this page range.

Parameters
style:String

one of the STYLE_* constants or null if no page numbering is desired.