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:

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>();
    listOptions.Add(barcodeOptions);
    listOptions.Add(qrCodeOptions);
    listOptions.Add(metadataOptions);
    
    // 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);
        }
    }
    else
    {
        Console.WriteLine("Signatures was not found.");
    }
}

More resources

Advanced Usage Topics

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

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.