Search for multiple e-signature types

Sometimes you may want to search for electronic signatures of different types simultaneously. GroupDocs.Signature allows searching documents for different signature types in an easy and intuitive way. In common words the idea is to pass collection of desired signature types to Search method.

Here are the steps to search for multiple signatures types within the document with GroupDocs.Signature:

  • Create new instance of Signature class and pass source document path as a constructor parameter.
  • Instantiate search options for required signature types and them to collection of List<SearchOptions>  type.

The possible options are:

This example shows how to search for multiple electronic signature types in the document.

using (Signature signature = new Signature("SingedSample.pdf"))
    // define few search options
    BarcodeSearchOptions barcodeOptions = new BarcodeSearchOptions()
        EncodeType = BarcodeTypes.Code128
    QRCodeSearchOptions qrCodeOptions = new QRCodeSearchOptions()
        EncodeType = QRCodeTypes.QR,
        Text = "John",
        MatchType = TextMatchType.Contains
    MetadataSearchOptions metadataOptions = new MetadataSearchOptions()
     IncludeBuiltinProperties = true

    // add options to list
    List<SearchOptions> listOptions = new List<SearchOptions>();

    // search for signatures in document
    SearchResult result = signature.Search(listOptions);
    if (result.Signatures.Count > 0)
        Console.WriteLine("\nSource document contains following signatures.");
        foreach (var resSignature in result.Signatures)
            Console.WriteLine("Signature found at page {0} with type {1}", resSignature.PageNumber, resSignature.SignatureType);
        Console.WriteLine("Signatures was not found.");

Advanced Usage Topics

To learn more about document eSign features, please refer to the advanced usage section.

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured .NET library we provide simple, but powerful free Apps.

You are welcome to eSign PDF, Word, Excel, PowerPoint documents with free to use online GroupDocs Signature App.