Verify Document for Signatures

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Signature MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-signature -- dnx GroupDocs.Signature.Mcp --yes
Folders, licensing and more →

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: