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.

Signature signature = new Signature("SingedSample.pdf");
BarcodeSearchOptions barcodeOptions = new BarcodeSearchOptions();
barcodeOptions.setAllPages(true);
barcodeOptions.setEncodeType(BarcodeTypes.Code128);
 
QrCodeSearchOptions qrCodeOptions = new QrCodeSearchOptions();
qrCodeOptions.setAllPages(true);
qrCodeOptions.setEncodeType(QrCodeTypes.QR);
qrCodeOptions.setText("John");
qrCodeOptions.setMatchType(TextMatchType.Contains);
 
MetadataSearchOptions metadataOptions = new MetadataSearchOptions();
metadataOptions.setAllPages(true);
metadataOptions.setIncludeBuiltinProperties(true);
 
// add options to list
List<SearchOptions> listOptions = new ArrayList<SearchOptions>();
listOptions.add(barcodeOptions);
listOptions.add(qrCodeOptions);
listOptions.add(metadataOptions);
 
// search for signatures in document
SearchResult result = signature.search(listOptions);
if (result.getSignatures().size() > 0)
{
    System.out.print("\nSource document contains following signatures.");
    for (BaseSignature resSignature : result.getSignatures())
    {
        System.out.print("Signature found at page "+resSignature.getPageNumber()+" with type "+resSignature.getSignatureType());
    }
}
else
{
    System.out.print("No one signature was 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.