ByteScout BarCode Generator SDK - C# - Generate vCard QR Code - ByteScout

ByteScout BarCode Generator SDK – C# – Generate vCard QR Code

  • Home
  • /
  • Articles
  • /
  • ByteScout BarCode Generator SDK – C# – Generate vCard QR Code

How to generate vcard QR code in C# and ByteScout Barcode SDK

This code in C# shows how to generate vcard QR code with this how to tutorial

The documentation is designed to help you to implement the features on your side. Want to generate vcard QR code in your C# app? ByteScout Barcode SDK is designed for it. ByteScout Barcode SDK is the fully featured library to generate barcodes. Supports QR Code, Code 39, Code 128, UPC, GS1, GS-128, PDF417, Datamatrix and many other barcode types. Includes various options for barcode generation to ensure output quality, add barcodes to new or existing pdf files and images.

This code snippet below for ByteScout Barcode SDK works best when you need to quickly generate vcard QR code in your C# application. In your C# project or application you may simply copy & paste the code and then run your app! Use of ByteScout Barcode SDK in C# is also explained in the documentation included along with the product.

Trial version of ByteScout Barcode SDK is available for free. Source code samples are included to help you with your C# app.

Try ByteScout Barcode SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

using System.Diagnostics; using System.Drawing.Imaging; using System.IO; using Bytescout.BarCode; using Thought.vCards; namespace GenerateVCardQRCode { /// <summary> /// This example demonstrates generation 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 /// /// /// </summary> class Program { static void Main(string[] args) { // Generate vCard vCard vCard = new vCard(); vCard.GivenName = "Forrest"; vCard.FamilyName = "Gump"; vCard.Organization = "Bubba Gump Shrimp Co."; vCard.Title = "Shrimp Man"; vCard.Phones.Add(new vCardPhone("(111) 555-1212", vCardPhoneTypes.Home)); vCard.EmailAddresses.Add(new vCardEmailAddress("", vCardEmailAddressType.Internet)); vCardDeliveryAddress address = new vCardDeliveryAddress(); address.AddressType = vCardDeliveryAddressTypes.Home; address.Street = "100 Waters Edge"; address.City = "Baytown"; address.Region = "LA"; address.PostalCode = "30314"; address.Country = "United States of America"; vCard.DeliveryAddresses.Add(address); // Save vCard data to string vCardStandardWriter writer = new vCardStandardWriter(); StringWriter stringWriter = new StringWriter(); writer.Write(vCard, stringWriter); // Create Bytescout.Barcode instance using (Barcode barcode = new Barcode()) { // Set barcode type barcode.Symbology = SymbologyType.QRCode; // Set barcode value barcode.Value = stringWriter.ToString(); // Save barcode to image barcode.SaveImage("result.png", ImageFormat.Png); // Open generated barcode image in default associated application Process.Start("result.png"); } } } }

Try ByteScout Barcode SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)



Get 60 Day Free Trial or Visit ByteScout Barcode SDK Home Page

Explore ByteScout Barcode SDK Documentation

Get ByteScout Barcode SDK Free Training


Get Your Free API Key

Explore Web API Documentation