ByteScout Premium Suite - C# - Read vcard from qr code with barcode reader sdk - ByteScout

ByteScout Premium Suite – C# – Read vcard from qr code with barcode reader sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Read vcard from qr code with barcode reader sdk

How to read vcard from qr code with barcode reader sdk in C# using ByteScout Premium Suite

How to write a robust code in C# to read vcard from qr code with barcode reader sdk with this step-by-step tutorial

The sample shows instructions and algorithm of how to read vcard from qr code with barcode reader sdk and how to make it run in your C# application. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can be applied to read vcard from qr code with barcode reader sdk using C#.

Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Premium Suite for read vcard from qr code with barcode reader sdk below and use it in your application. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. Check C# sample code samples to see if they respond to your needs and requirements for the project.

All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.IO; using Bytescout.BarCodeReader; using Thought.vCards; namespace ReadVCardFromQRCode { /// <summary> /// This example demonstrates reading of QR Code encoded vCard. /// It uses vCard library by David Pinch: /// /// vCard Class Library for .NET (Version 0.4; LGPL license) /// Copyright (c) 2007-2009 David Pinch /// http://www.thoughtproject.com/Libraries/vCard/ /// /// </summary> class Program { static void Main(string[] args) { // Create Bytescout.BarCodeReader.Reader instance using (Reader reader = new Reader()) { // Enable QR Code decoding reader.BarcodeTypesToFind.QRCode = true; /* ----------------------------------------------------------------------- NOTE: We can read barcodes from specific page to increase performance. For sample please refer to "Decoding barcodes from PDF by pages" program. ----------------------------------------------------------------------- */ // Decode QR Code from image FoundBarcode[] barcodes = reader.ReadFrom("sample_vcard.gif"); if (barcodes.Length > 0) { FoundBarcode vcardBarcode = barcodes[0]; // Decode vCard information from barcode value StringReader stringReader = new StringReader(vcardBarcode.Value); vCard vCard = new vCard(stringReader); // Display some decoded info: Console.WriteLine("GivenName: " + vCard.GivenName); Console.WriteLine("FamilyName: " + vCard.FamilyName); Console.WriteLine("Organization: " + vCard.Organization); Console.WriteLine("Title: " + vCard.Title); Console.WriteLine("Phone: " + vCard.Phones[0].FullNumber); Console.WriteLine("EmailAddresses: " + vCard.EmailAddresses[0]); Console.WriteLine("DeliveryAddress: " + vCard.DeliveryAddresses[0].Street + " " + vCard.DeliveryAddresses[0].City + " " + vCard.DeliveryAddresses[0].Region + " " + vCard.DeliveryAddresses[0].PostalCode + " " + vCard.DeliveryAddresses[0].Country); } } Console.WriteLine(); Console.WriteLine("Press any key..."); Console.ReadKey(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next