# PageLabelingRange

## Content

# Class: PageLabelingRange

Represents a page labeling range.
<para>
A document is divided into labeling ranges, each of which is a series of consecutive pages
using the same numbering system. Labeling ranges shall not overlap, and pages within a range
shall be numbered sequentially in ascending order. A page's label consists of a numeric portion
based on its position within its labeling range, optionally preceded by a label prefix.
</para>

## Extends

- [`ObjectBase`](ObjectBase)

## Constructors

### Constructor

```ts
new PageLabelingRange(om): PageLabelingRange;
```

Creates a new PageLabelingRange object.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

An object manager that controls the lifetime of this object.

#### Returns

`PageLabelingRange`

#### Overrides

```ts
ObjectBase.constructor
```

### Constructor

```ts
new PageLabelingRange(): PageLabelingRange;
```

Creates a new PageLabelingRange object.

#### Returns

`PageLabelingRange`

#### Overrides

```ts
ObjectBase.constructor
```

## Accessors

### firstPageIndexInDocument

#### Get Signature

```ts
get firstPageIndexInDocument(): number;
```

Gets the index of the page (in the document) from which this range starts.

##### Returns

`number`

***

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ObjectBase`](ObjectBase).[`id`](ObjectBase#id)

***

### numberingStyle

#### Get Signature

```ts
get numberingStyle(): NumberingStyle;
```

Gets the numbering style used for the numeric portion of each page label.
If set to [NumberingStyle.Unset](../enumerations/NumberingStyle#unset), page labels consist solely of a label prefix with no numeric portion.

##### Returns

[`NumberingStyle`](../enumerations/NumberingStyle)

#### Set Signature

```ts
set numberingStyle(value): void;
```

Sets the numbering style used for the numeric portion of each page label.

##### Parameters

###### value

[`NumberingStyle`](../enumerations/NumberingStyle)

##### Returns

`void`

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ObjectBase`](ObjectBase).[`om`](ObjectBase#om)

***

### prefix

#### Get Signature

```ts
get prefix(): string;
```

Gets the label prefix for page labels in this range.

##### Returns

`string`

#### Set Signature

```ts
set prefix(value): void;
```

Sets the label prefix for page labels in this range.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### startPageNumber

#### Get Signature

```ts
get startPageNumber(): number;
```

Gets the value of the numeric portion for the first page label in the range.
Subsequent pages shall be numbered sequentially from this value,
which shall be greater than or equal to 1. Default value: 1.

##### Returns

`number`

#### Set Signature

```ts
set startPageNumber(value): void;
```

Sets the value of the numeric portion for the first page label in the range.
Subsequent pages shall be numbered sequentially from this value,
which shall be greater than or equal to 1. Default value: 1.

##### Parameters

###### value

`number`

##### Returns

`void`

## Methods

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#free)

***

### getPageLabel()

```ts
getPageLabel(pageDocumentIndex): string;
```

Returns the label for a page at the specified document page index.

#### Parameters

##### pageDocumentIndex

`number`

The zero-based page index in the document.

#### Returns

`string`

The page label string.

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`rebind`](ObjectBase#rebind)
