# PdfImageHandlerCollection

## Content

# Class: PdfImageHandlerCollection

Represents a collection of [PdfImageHandler](PdfImageHandler) objects.

## Extends

- `PdfKeyedObjectCollection`&lt;[`Image`](Image), [`PdfImageHandler`](PdfImageHandler)&gt;

## Accessors

### count

#### Get Signature

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

Gets the number of items in the map.

##### Returns

`number`

#### Overrides

```ts
PdfKeyedObjectCollection.count
```

***

### id

#### Get Signature

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

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

```ts
PdfKeyedObjectCollection.id
```

***

### last

#### Get Signature

```ts
get last(): TItem;
```

Gets last item in the collection.

##### Returns

`TItem`

#### Inherited from

```ts
PdfKeyedObjectCollection.last
```

***

### om

#### Get Signature

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

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

```ts
PdfKeyedObjectCollection.om
```

## Methods

### add()

```ts
add(item): void;
```

Adds an item to the end of the collection.

#### Parameters

##### item

[`PdfImageHandler`](PdfImageHandler)

The item to add.

#### Returns

`void`

#### Inherited from

```ts
PdfKeyedObjectCollection.add
```

***

### clear()

```ts
clear(): void;
```

Clears the collection.

#### Returns

`void`

#### Overrides

```ts
PdfKeyedObjectCollection.clear
```

***

### contains()

```ts
contains(item): boolean;
```

Determines whether the item is in the collection.

#### Parameters

##### item

[`PdfImageHandler`](PdfImageHandler)

#### Returns

`boolean`

true if the item is in the collection, false otherwise.

#### Overrides

```ts
PdfKeyedObjectCollection.contains
```

***

### containsKey()

```ts
containsKey(key): boolean;
```

Determines whether the item with specified key exists in the collection.

#### Parameters

##### key

[`Image`](Image)

#### Returns

`boolean`

true if the item with the specified key exists in the collection, false otherwise.

#### Overrides

```ts
PdfKeyedObjectCollection.containsKey
```

***

### free()

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

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

#### Returns

`void`

#### Inherited from

```ts
PdfKeyedObjectCollection.free
```

***

### get()

```ts
get(key): PdfImageHandler;
```

Gets the item with the specified key.

#### Parameters

##### key

[`Image`](Image)

#### Returns

[`PdfImageHandler`](PdfImageHandler)

#### Overrides

```ts
PdfKeyedObjectCollection.get
```

***

### getAt()

```ts
getAt(index): PdfImageHandler;
```

Gets the item with the specified index.

#### Parameters

##### index

`number`

The index of the item.

#### Returns

[`PdfImageHandler`](PdfImageHandler)

#### Overrides

```ts
PdfKeyedObjectCollection.getAt
```

***

### getImageHandler()

```ts
getImageHandler(image): PdfImageHandler;
```

Gets an existing [PdfImageHandler](PdfImageHandler) associated with a specified [Image](Image),
or creates a new one if such image does not exist.

#### Parameters

##### image

[`Image`](Image)

The image

#### Returns

[`PdfImageHandler`](PdfImageHandler)

The existing or newly created [PdfImageHandler](PdfImageHandler).

***

### insert()

```ts
insert(index, item): void;
```

Inserts an item at a specific position in the collection.

#### Parameters

##### index

`number`

The position where the item will be inserted.

##### item

[`PdfImageHandler`](PdfImageHandler)

The item to insert.

#### Returns

`void`

#### Overrides

```ts
PdfKeyedObjectCollection.insert
```

***

### 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

```ts
PdfKeyedObjectCollection.rebind
```

***

### remove()

```ts
remove(item): boolean;
```

Removes the specified item from the collection.

#### Parameters

##### item

[`PdfImageHandler`](PdfImageHandler)

The item to remove.

#### Returns

`boolean`

true if the item was actually removed, false otherwise.

#### Overrides

```ts
PdfKeyedObjectCollection.remove
```

***

### removeAt()

```ts
removeAt(index): void;
```

Removes the item at specified index.

#### Parameters

##### index

`number`

The index of the item to remove.

#### Returns

`void`

#### Overrides

```ts
PdfKeyedObjectCollection.removeAt
```

***

### removeByKey()

```ts
removeByKey(key): boolean;
```

Removes the item with specified key from the collection.

#### Parameters

##### key

[`Image`](Image)

The key to remove.

#### Returns

`boolean`

true if the item with specified key was actually removed, false otherwise.

#### Overrides

```ts
PdfKeyedObjectCollection.removeByKey
```

***

### setAt()

```ts
setAt(index, item): void;
```

Sets the item at the specified index.

#### Parameters

##### index

`number`

The index of the item, starting from 0.

##### item

[`PdfImageHandler`](PdfImageHandler)

The object to set.

#### Returns

`void`

#### Overrides

```ts
PdfKeyedObjectCollection.setAt
```
