Searching for document signatures with exception handling

GroupDocs.Signature provides different error messages due to validation issues, missing required data, files etc. For handling these exceptions class GroupDocsSignatureExceptionshould be used.

Here are the steps to handle exceptions from GroupDocs.Signature while searching for document signatures:

Exception handling while searching for document signatures

This example shows how to handle GroupDocs.Signature exceptions.

try {
    LoadOptions loadOptions = new LoadOptions();
    Signature signature = new Signature("samplePasswordProtected.pdf");
    // create QRCode option with predefined QRCode text
    DigitalSearchOptions options = new DigitalSearchOptions();
 
    // search signature document
    List<DigitalSignature> signatures = signature.search(DigitalSignature.class,options);
} catch (GroupDocsSignatureException ex) {
    System.out.print("GroupDocs Signature Exception: " + ex.getMessage());
} catch (Exception ex) {
    System.out.print("System Exception: " + ex.getMessage());
}

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.

© Aspose Pty Ltd 2001-2022. All Rights Reserved.