# PdfImageHandler

## Content

[**DsPdfJS API v9.1.3**](../README)

***

[DsPdfJS API](../globals) / PdfImageHandler

# Class: PdfImageHandler

Represents and manages a [Image](Image)
used in a [PdfDocument](PdfDocument).

## Extends

- [`ObjectBase`](ObjectBase)

## Accessors

### format

#### Get Signature

> **get** **format**(): [`PdfImageFormat`](../enumerations/PdfImageFormat) \| `null`

Gets or sets the format used to encode the image associated with this PdfImageHandler.

By default this property is unspecified (null), and the actual embedding mode is determined
by [PdfDocument#imageOptions](PdfDocument#imageoptions).

##### Returns

[`PdfImageFormat`](../enumerations/PdfImageFormat) \| `null`

#### Set Signature

> **set** **format**(`value`): `void`

Gets or sets the format used to encode the image associated with this PdfImageHandler.

By default this property is unspecified (null), and the actual embedding mode is determined
by [PdfDocument#imageOptions](PdfDocument#imageoptions).

##### Parameters

###### value

[`PdfImageFormat`](../enumerations/PdfImageFormat) | `null`

##### Returns

`void`

***

### id

#### Get Signature

> **get** **id**(): `number`

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

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

***

### image

#### Get Signature

> **get** **image**(): [`Image`](Image)

Gets the [Image](Image) object managed by this PdfImageHandler object.

##### Returns

[`Image`](Image)

***

### om

#### Get Signature

> **get** **om**(): [`ObjectManager`](ObjectManager)

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

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

## Methods

### free()

> **free**(): `void`

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

#### Returns

`void`

#### Inherited from

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

***

### rebind()

> **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)
