# PdfSignature

## Content

# Class: PdfSignature

Represents a PDF signature object.

## Extends

- [`ObjectBase`](ObjectBase)

## Accessors

### contactInfo

#### Get Signature

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

Gets the information provided by the signer to enable a recipient to contact the signer
to verify the signature (for example, a phone number).

##### Returns

`string`

***

### contents

#### Get Signature

```ts
get contents(): Uint8Array<ArrayBufferLike>;
```

Gets the raw signature contents.

##### Returns

`Uint8Array`&lt;`ArrayBufferLike`&gt;

The signature value as a Uint8Array, or `null` if not present.

***

### doc

#### Get Signature

```ts
get doc(): PdfDocument;
```

Gets the [PdfDocument](PdfDocument) owning this signature.

##### Returns

[`PdfDocument`](PdfDocument)

***

### filter

#### Get Signature

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

Gets the name of the preferred signature handler to use when validating this signature.

##### Returns

`string`

***

### id

#### Get Signature

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

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

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

***

### location

#### Get Signature

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

Gets the CPU host name or physical location of the signing.

##### Returns

`string`

***

### om

#### Get Signature

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

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

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

***

### reason

#### Get Signature

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

Gets the reason for the signing, such as "I agree...".

##### Returns

`string`

***

### signerName

#### Get Signature

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

Gets the name of the person or authority signing the document.
This value should be used only when it is not possible to extract the name from the signature;
for example, from the certificate of the signer.

##### Returns

`string`

***

### signingTime

#### Get Signature

```ts
get signingTime(): PdfDateTime;
```

Gets the time of signing.
Depending on the signature handler, this may be a normal unverified computer time or
a time generated in a verifiable way from a secure time server.
This value should be used only when the time of signing is not available in the signature;
for example, a time stamp can be embedded in a PKCS#7 binary data object (see PDF specification for more details).

##### Returns

[`PdfDateTime`](../type-aliases/PdfDateTime)

***

### subFilter

#### Get Signature

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

Gets a name that describes the encoding of the signature value and key information in the signature dictionary.

##### Returns

`string`

***

### type

#### Get Signature

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

Gets the signature type,
if present, shall be "Sig" for a signature dictionary or
"DocTimeStamp" for a time-stamp signature dictionary.

##### Returns

`string`

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

***

### parseContent()

```ts
parseContent(): Pkcs7Content;
```

Parses the signature contents and returns a structured representation.

#### Returns

[`Pkcs7Content`](../type-aliases/Pkcs7Content)

A [Pkcs7Content](../type-aliases/Pkcs7Content) object created by parsing
the value of [PdfSignature#contents](#contents).

***

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