# PageLabel Class

> Describes numbering labels for a range of pages.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2a
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/PageLabel
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/llms.txt

```java
class PageLabel
```

**Namespace:** `com::datalogics::PDFL`

## Description

Describes numbering labels for a range of pages. PageLabel describes how to construct a label string for a range of pages. It contains information on number style, any prefixes, and a starting position within the document.

Note that a single PageLabel describes the label string for several pages all pages up until the first page covered by the next PageLabel, or the end of the document.

Also note that if a Document has any PageLabels, there must be one that starts at page index 0. This will be automatically created if the user does not supply one.

**Referenced by:** [`Document`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Document.md), [`PageLabelVector`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/PageLabelVector.md)

## Constructors

### PageLabel

```java
com.datalogics.PDFL.PageLabel.PageLabel(int start, NumberStyle ns)
```

*constructor*

**Parameters**

- `start` (`int`): Starting page index in the Document for this range
- `ns` (`NumberStyle`): Numbering style for this range

Convenience constructor creates a range with no prefix starting with number 1.

### PageLabel

```java
com.datalogics.PDFL.PageLabel.PageLabel(int start, NumberStyle ns, String p, int first)
```

*constructor*

**Parameters**

- `start` (`int`): Starting page index in the Document for this range
- `ns` (`NumberStyle`): Numbering style for this range
- `p` (`String`): Prefix string for this range
- `first` (`int`): First number appearing on a page in this range

Public constructor

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.PageLabel.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.PageLabel.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.PageLabel.finalize()
```

*protected*

**Returns:** `void`

### getEndPageIndex

```java
int com.datalogics.PDFL.PageLabel.getEndPageIndex()
```

**Returns:** `int`

The end index for the page label range

You cannot set the end index for a range; you must change the start index for the following range. A value of -1 means the end index for this PageLabel is unknown.

### getFirstNumberInRange

```java
int com.datalogics.PDFL.PageLabel.getFirstNumberInRange()
```

**Returns:** `int`

The first number used in the page label range. Must be greater than or equal to 1.

### getNumberStyle

```java
NumberStyle com.datalogics.PDFL.PageLabel.getNumberStyle()
```

**Returns:** `NumberStyle`

The numbering style for the page label range

### getPrefix

```java
String com.datalogics.PDFL.PageLabel.getPrefix()
```

**Returns:** `String`

The prefix string for the page label range

### getStartPageIndex

```java
int com.datalogics.PDFL.PageLabel.getStartPageIndex()
```

**Returns:** `int`

The start index for the page label range

### setFirstNumberInRange

```java
void com.datalogics.PDFL.PageLabel.setFirstNumberInRange(int arg0)
```

**Parameters**

- `arg0` (`int`)

**Returns:** `void`

The first number used in the page label range

### setNumberStyle

```java
void com.datalogics.PDFL.PageLabel.setNumberStyle(NumberStyle arg0)
```

**Parameters**

- `arg0` (`NumberStyle`)

**Returns:** `void`

The numbering style for the page label range

### setPrefix

```java
void com.datalogics.PDFL.PageLabel.setPrefix(String arg0)
```

**Parameters**

- `arg0` (`String`)

**Returns:** `void`

The prefix string for the page label range

### setStartPageIndex

```java
void com.datalogics.PDFL.PageLabel.setStartPageIndex(int ndx)
```

**Parameters**

- `ndx` (`int`)

**Returns:** `void`

The start index for the page label range

### toString

```java
String com.datalogics.PDFL.PageLabel.toString()
```

**Returns:** `String`
