Here are the steps to verifyย QR Code signature within the document with GroupDocs.Signature:
Create new instance ofย Signatureย class and pass source document path as a constructor parameter.
*Instantiate theย ย QrCodeVerifyOptionsย object according to your requirements and specify verification options
This example shows how to verify QR Code signature in the document.ย Seeย VerificationResult
using(Signaturesignature=newSignature("sample.pdf")){QrCodeVerifyOptionsoptions=newQrCodeVerifyOptions(){// specify if all pages shoudl be verifiedAllPages=false,PagesSetup=newPagesSetup(){FirstPage=false,LastPage=true,OddPages=false,EvenPages=true},// specify text patternText="John",// specify verification text patternMatchType=TextMatchType.Contains,// specify types of QR code to verifyEncodeType=QrCodeTypes.QR};// verify document signaturesVerificationResultresult=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: