Search for QR Code standard entries
Leave feedback
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:
- Create new instance ofΒ Β SignatureΒ class and pass source document path as a constructor parameter.
- Call the generic SearchΒ method ofΒ SignatureΒ with the QrCodeSignature generic typeΒ and passΒ SignatureType.QRCodeΒ to it.
- Enumarate the response with the list of the [QrCodeSignature] (https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/qrcodesignature/) signatures and call generic [GetData] (https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/qrcodesignature/getdata/#getdata) method to retrieve the required instance of the object
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}");
}
}
}
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}");
}
}
}
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}");
}
}
}
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}");
}
}
}
You may easily run the code above and see the feature in action in ourΒ GitHub examples:
- GroupDocs.Signature for .NET examples, plugins, and showcase
- GroupDocs.Signature for Java examples, plugins, and showcase
- Document Signature for .NET MVC UI Example
- Document Signature for .NET App WebForms UI Example
- Document Signature for Java App Dropwizard UI Example
- Document Signature for Java Spring UI Example
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.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.