Basic usage

GroupDocs Signature library provides ability to manipulate with different electronic signature types such as Text, Image, Digital, Barcode, QR-code, Stamp, Form Field, Metadata. These e-signatures could be added to document, updated, deleted, verified or searched inside already signed documents. Our product also provides information aboutΒ document type and structure -Β file type, size, pages count, etc. and generates document pages preview based on provided options.

Here are mainΒ GroupDocs Signature APIΒ concepts:

  • Signature is the main class that contains all required methods for manipulating with document e-signatures.
  • Most part of methods expects different options toΒ eSign document, verify and search electronic signatures inside document.
  • SignatureΒ class implementsΒ IDisposableΒ interface to correctly release used resources - like safely closing document streams when all operations completed.

Referencing required namespaces

The following code shows how to include required namespace for all code examples.

using GroupDocs.Signature;
using GroupDocs.Signature.Domain;
using GroupDocs.Signature.Options;
using GroupDocs.Signature.Domain.Extensions;

Signature object definition

The following code shows most used code pattern to defineΒ SignatureΒ object and call its methods.

// Sign document with text signature.
using (Signature signature = new Signature("sample.docx"))
{
   TextSignOptions textSignOptions = new TextSignOptions("John Smith");
   signature.Sign("SampleSigned.docx", textSignOptions);
}

Please check detailed examples of how to eSign documents, search and verify document signatures in the following guides: