Verify Document for Signatures

GroupDocs.Signature for Python via .NET provides functionality to verify various types of signatures in documents. This section demonstrates how to verify different types of signatures using Python.

Basic Usage Example

Here’s a simple example showing how to verify signatures in a document:

import groupdocs.signature as signature
from groupdocs.signature.options import TextVerifyOptions

# Initialize signature
with signature.Signature("sample_signed.pdf") as sign:
    # Create verification options
    options = TextVerifyOptions()
    options.text = "John Smith"
    options.match_type = signature.TextMatchType.Contains
    
    # Verify signatures
    result = sign.verify(options)
    
    if result.is_valid:
        print("Document is valid! All signatures are valid.")
    else:
        print("Document is invalid! Some signatures are invalid.")

The following articles in this section provide detailed examples for verifying specific types of signatures: