Search for QR Code standard entries

GroupDocs.SignatureΒ provides ability to embed into QR-code signature standard entries like email, contact v-card, address etc, WiFi, contact MeCard. This feature supports standard QR-code representation of entries. At this moment following standard QR-code entries are supported

  • Email entry that allows to specify in QR-code standard email information with recipient, subject and body.
  • Address entry contains address information.
  • V-Card entry implements standard of visit card 3.0 specification. More details could be found here.
  • Me-Card entry implements similar to V-Card contact details standard. More details could be found here.
  • EPC implements standard of the European Payments Council guidelines define the content of a QR code that can be used to initiate SEPA credit transfer. More details could be found here.
  • Event entry implements event standard.
  • WiFi entry implements WiFI settings standard.
  • SMS entry implements sms properties.
  • CryptoCurrencyTransfer entry implements event standard.

Here are the steps to extract standard entry frmo the QR-code signature with GroupDocs.Signature:

Example 1: How to get Address QR Code object in the document

Following example shows how to search for QR-code Address object in the PDF document.

using (Signature signature = new Signature("sample.pdf"))
{
    var signatures = signature.Search<QrCodeSignature>(SignatureType.QrCode);
    foreach (var qrSignature in signatures)
    {
        var address = qrSignature.GetData<Address>();
        if (address != null)
        {
            Console.WriteLine($"Found Address: {Address.Country} {Address.State} {Address.City} {Address.ZIP}");
        }
    }
}

Example 2 : how to get Email QR Code object in the document

Following example shows how to search for QR-code Email object in the PDF document.

using (Signature signature = new Signature("sample.pdf"))
{
    var signatures = signature.Search<QrCodeSignature>(SignatureType.QrCode);
    foreach (var qrSignature in signatures)
    {
        var email = qrSignature.GetData<Email>();
        if (email != null)
        {
            Console.WriteLine($"Found Email signature: {email.Address}: [{email.Subject}] : {email.Body}");
        }
    }
}

Example 3 : how to retrieve VCard QR Code object from image or document

Following example shows how to retrieve contact VCard object from the QR Code signature.

using (Signature signature = new Signature("sample.pdf"))
{
    var signatures = signature.Search<QrCodeSignature>(SignatureType.QrCode);
    foreach (var qrSignature in signatures)
    {
        var vCard = qrSignature.GetData<VCard>();
        if (vCard != null)
        {
            Console.WriteLine($"Found VCard signature: {vcard.FirstName} {vcard.LastName} from {vcard.Company}. Tel: {vcard.CellPhone}");
        }
    }
}

Example 4 : How to find the EPC data in the QR Code from image or document

Following example shows to find the EPC (The European Payments Council Quick Response Code) data in the QR Code from image or document.

using (Signature signature = new Signature("sample.pdf"))
{
    var signatures = signature.Search<QrCodeSignature>(SignatureType.QrCode);
    foreach (var qrSignature in signatures)
    {
        var payment = qrSignature.GetData<EPC>();
        if (payment != null)
        {
            Console.WriteLine($"EPC: {payment.Name}, IBAN {payment.IBAN}. Amount {payment.Amount}. Ref: {payment.Reference} / {payment.Remittance}");
        }
    }
}

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.