Verify Qr Code Signatures

id: verify-qr-code-signatures url: signature/net/verify-qr-code-signatures title: Verifying QR Code signatures in advance weight: 2 description: " This article explains how to provide advanced verification of QR Code electronic signatures with GroupDocs.Signature API." keywords: productName: GroupDocs.Signature for .NET toc: True structuredData: showOrganization: True application:
name: Verify QR code signature in documents using C#
description: This article explains how to scan the document for QR Code and provide its verification with C# language and GroupDocs.Signature for .NET APIs productCode: signature productPlatform: net showVideo: True howTo: name: How to scan QR Code and verify the document for specific QR Code entities using C# description: This topic explains how to verify the document for QR Code, provide QR Code verification and validation in C# steps: - name: Load document for verification from the local file or stream. text: Create Signature class instance by passing either local or network file path or stream. - name: Provide QR Code verification options. text: Set demanded data of the QRCodeVerifyOptions instance to specify optionally QR Code type or text. - name: Run verification text: Call the Verify method with passing verification options and keep the verification process result. - name: Analyse verification result text: Check verification result for its state and verification details.

GroupDocs.Signature provides different properties in QrCodeVerifyOptions class to specify verification of QR Code signatures.

Here are the steps to verify QR Code signature within the document with GroupDocs.Signature:

This example shows how to verify QR Code signature in the document. See VerificationResult

using (Signature signature = new Signature("sample.pdf"))
{
    QrCodeVerifyOptions options = new QrCodeVerifyOptions()
    {
        // specify if all pages should be verified
        AllPages = false,
        PagesSetup = new PagesSetup() {  FirstPage = false, LastPage = true, OddPages = false, EvenPages = true },
        // specify text pattern
        Text = "John",
        // specify verification text pattern
        MatchType = TextMatchType.Contains,
        // specify types of QR code to verify
        EncodeType = QrCodeTypes.QR
    };
    // verify document signatures
    VerificationResult result = signature.Verify(options);
    if (result.IsValid)
    {
        Console.WriteLine("\nDocument was verified successfully!");
    }
    else
    {
        Console.WriteLine("\nDocument failed verification process.");
    }
}

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online Apps

Along with the full-featured .NET library, we provide simple but powerful free online apps.

To sign PDF, Word, Excel, PowerPoint, and other documents you can use the online apps from the GroupDocs.Signature App Product Family.


Close
Loading

Analyzing your prompt, please hold on...

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