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. The is_valid property of the returned VerificationResult is True when the document contains valid signatures that match the verification options, and succeeded lists them:

from groupdocs.signature import Signature
from groupdocs.signature.domain import TextMatchType
from groupdocs.signature.options import TextVerifyOptions

# Open the signed document
with Signature("signed.pdf") as signature:
    # Create verification options
    options = TextVerifyOptions()
    options.text = "John Smith"
    options.match_type = TextMatchType.CONTAINS

    # Verify signatures
    result = signature.verify(options)

    if result.is_valid:
        print(f"Document was verified successfully: {len(result.succeeded)} matching signature(s).")
    else:
        print("Document failed verification process.")

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

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.