QrCodeVerifyOptions class

QrCodeVerifyOptions class

Keeps options to verify document QR-code signature.

The QrCodeVerifyOptions type exposes the following members:

Constructors

Constructor Description
init Initializes verification options for QR-Code signatures.
init Initializes verification options for QR-Code signatures with the specified QR-code text.
init Initializes verification options for QR-Code signatures with text and QR-Code encode type to verify.

Properties

Property Description
data_encryption The implementation of IDataEncryption used to encode and decode QR-Code signature text properties.
encode_type The QR-code type verification. This property is optional.
all_pages The flag indicating whether each document page should be verified. By default the value is True. (inherited from VerifyOptions)
extensions The additional extensions for alternative signature options verification. (inherited from VerifyOptions)
form_text_field_title The title of the form field to verify. If set, the text will be found only in text form fields. (inherited from TextVerifyOptions)
form_text_field_type The type of form field to verify; if set, text will be found only in text form fields. (inherited from TextVerifyOptions)
is_valid The valid property flag. (inherited from VerifyOptions)
match_type The text match type verification. (inherited from TextVerifyOptions)
page_number The document page number to be verified; if not set, all pages of the document are verified for the first occurrence (minimum value is 1). (inherited from VerifyOptions)
pages_setup The page options to specify pages to be verified. (inherited from VerifyOptions)
shape_position The shape position in the document layout used for verifying signatures in headers/footers. (inherited from VerifyOptions)
signature_id The Text Signature ID to verify. Must be greater than zero; supported only for PDF documents. (inherited from TextVerifyOptions)
signature_implementation The type of signature to be verified. (inherited from TextVerifyOptions)
text The signature text to verify. (inherited from TextVerifyOptions)

Example

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

def verify_qr_codes():
    with Signature("signed.pdf") as signature:
        options = QrCodeVerifyOptions()
        options.all_pages = True
        options.text = "John"
        options.match_type = TextMatchType.CONTAINS

        result = signature.verify(options)

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

See Also