# SignatureInfo

## Content

# Type Alias: SignatureInfo

```ts
type SignatureInfo = object;
```

Information about the document signature that will be used to sign the document.

## Examples

Send a request to the server to save the document with signature.
```javascript
viewer.save("test.pdf", { sign: { signatureField: "field1", signerName: "John Doe" } } );
```

Example of server side signing implementation
```csharp
// Example: electronically sign PDFs with a .PFX certificate:

public void Configuration(IAppBuilder app) {
    GcPdfViewerController.Settings.Sign += _OnSign;
    // ...
}

private void _OnSign(object sender, SignEventArgs e)
{
    var signatureProperties = e.SignatureProperties;
    X509Certificate2 certificate = new X509Certificate2(System.IO.File.ReadAllBytes("certificate.pfx"), "password",
      X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable);
    signatureProperties.SignatureBuilder = new Pkcs7SignatureBuilder()
    {
       CertificateChain = new X509Certificate2[] { certificate },
       HashAlgorithm = Security.OID.HashAlgorithms.SHA512,
       Format = Pkcs7SignatureBuilder.SignatureFormat.adbe_pkcs7_detached
    };
}
```

## Properties

### contactInfo

```ts
contactInfo: string;
```

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

***

### location

```ts
location: string;
```

The CPU host name or physical location of the signing.

***

### reason

```ts
reason: string;
```

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

***

### signatureField

```ts
signatureField: string;
```

The signature field name used to store a digital signature.

***

### signerName

```ts
signerName: string;
```

The name of the person or authority signing the document.
NOTE: This value is used only if it is not possible to extract the name from the signature, for example from the certificate of the signer.
