---
title: "DigitalSignatureOptions"
canonical_url: "https://www.nutrient.io/api/csharp/signing/digital-signature-options/"
md_url: "https://www.nutrient.io/api/csharp/signing/digital-signature-options.md"
last_updated: "2026-10-08T08:55:57.713Z"
description: "Options for creating a digital signature on a PDF document."
---

Options for creating a digital signature on a PDF document.

A digital signature requires a certificate (PFX/P12 file) to cryptographically sign the document. Additional metadata such as signer name, reason, and location can optionally be included. For PAdES-T compliance, configure a `Timestamp` to include a trusted timestamp.

```csharp

using Nutrient;

```

## Construction

```csharp

public DigitalSignatureOptions()

```

## Properties

### CertificatePassword

```csharp

public string CertificatePassword { get; set; }

```

The password to decrypt the PFX/P12 certificate file.

**Type:** `string`

### CertificatePath

```csharp

public string? CertificatePath { get; set; }

```

The file path to the PFX/P12 certificate file.

**Type:** `string?`

### CertificateSerialNumber

```csharp

public string? CertificateSerialNumber { get; set; }

```

The serial number of the certificate to use from the operating-system certificate store or a smartcard. Required when `KeySource` is `WindowsCertificateStore` or `SmartCard`.

**Type:** `string?`

### Certification

```csharp

public SignatureCertificationLevel Certification { get; set; }

```

The certification (DocMDP) level of the signature.

**Type:** [`SignatureCertificationLevel`](/api/csharp/enums/signature-certification-level/)

### ContactInfo

```csharp

public string? ContactInfo { get; set; }

```

Contact information for the signer.

**Type:** `string?`

### Format

```csharp

public SignatureFormat Format { get; set; }

```

The container format of the signature.

**Type:** [`SignatureFormat`](/api/csharp/enums/signature-format/)

### HashAlgorithm

```csharp

public SignatureHashAlgorithm HashAlgorithm { get; set; }

```

The hash algorithm to use for the signature.

**Type:** [`SignatureHashAlgorithm`](/api/csharp/enums/signature-hash-algorithm/)

### KeySource

```csharp

public SignatureKeySource KeySource { get; set; }

```

Where the signing key and certificate come from.

**Type:** [`SignatureKeySource`](/api/csharp/enums/signature-key-source/)

### Level

```csharp

public SignatureLevel Level { get; set; }

```

The PAdES baseline level to produce.

**Type:** [`SignatureLevel`](/api/csharp/enums/signature-level/)

### Location

```csharp

public string? Location { get; set; }

```

The location where the document was signed.

**Type:** `string?`

### Pkcs11

```csharp

public Pkcs11Options? Pkcs11 { get; set; }

```

The PKCS#11 module and key location. Required when `KeySource` is `Pkcs11`.

**Type:** [`Pkcs11Options?`](/api/csharp/signing/pkcs11-options/)

### Reason

```csharp

public string? Reason { get; set; }

```

The reason for signing the document.

**Type:** `string?`

### SignerName

```csharp

public string? SignerName { get; set; }

```

The name of the person or entity signing the document.

**Type:** `string?`

### SmartCardPin

```csharp

public string? SmartCardPin { get; set; }

```

The PIN used to unlock a smartcard key. Used when `KeySource` is `SmartCard`.

**Type:** `string?`

### Timestamp

```csharp

public TimestampConfiguration? Timestamp { get; set; }

```

Optional timestamp configuration for PAdES-T compliance.

**Type:** [`TimestampConfiguration?`](/api/csharp/signing/timestamp-configuration/)

## Methods

### SetCertificateStream

```csharp

public void SetCertificateStream(Stream value)

```

A stream containing the PFX/P12 certificate data.

**Parameters**

| Name    | Type     | Description                                          |
| ------- | -------- | ---------------------------------------------------- |
| `value` | `Stream` | The value to set for the CertificateStream property. |

## Resource management

```csharp

public void Dispose()

```

`DigitalSignatureOptions` implements `IDisposable`. Call `Dispose()` or use a C# `using` declaration to release its native handle right away. If you don't, the handle is released when the object is garbage collected.

---

## Related pages

- [Signing](/api/csharp/signing.md)
- [Pkcs11 Options](/api/csharp/signing/pkcs11-options.md)
- [Signature Appearance](/api/csharp/signing/signature-appearance.md)
- [Signature](/api/csharp/signing/signature.md)
- [Timestamp Configuration](/api/csharp/signing/timestamp-configuration.md)

