__init__ constructor

init

Initializes a new instance of the TextVerifyOptions with default values.

def __init__(self):
    ...

Example

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

def verify_text_signature():
    with Signature("signed.pdf") as signature:
        options = TextVerifyOptions("John Smith")
        result = signature.verify(options)
        print(f"Document is signed by John Smith: {result.is_valid}")

if __name__ == "__main__":
    verify_text_signature()

init

Initializes a new instance of the TextVerifyOptions with verification text.

def __init__(self, text):
    ...
Parameter Type Description
text str Text to be verified.

Example

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

with Signature("signed.pdf") as signature:
    options = TextVerifyOptions("John Smith")
    result = signature.verify(options)
    print(f"Document is signed by John Smith: {result.is_valid}")

init

Initializes a new TextVerifyOptions instance with the text to verify and the signature implementation type.

def __init__(self, text, implementation):
    ...
Parameter Type Description
text str Text to be verified.
implementation TextSignatureImplementation Signature implementation type.

Example

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

with Signature("signed.pdf") as signature:
    options = TextVerifyOptions("John Smith")
    result = signature.verify(options)
    print(f"Document is signed by John Smith: {result.is_valid}")

See Also