QR Code VCard

Modified on Tue, 18 Apr 2023 at 01:32 PM

Creating a basic VCard with Go ePower Blocks

PART A

1. The first step in creating a VCard is to know how a VCard is constructed.

You can visit numerous places on the internet to get that information. I like going to 

https://vcardmaker.com/

In that site you can enter all the details you want and it will give you the code you need in the Preview section to create the vcard.

http://en.wikipedia.org/wiki/VCard#vCard_3.0

In our example will build a version from 3.0.

BEGIN:VCARD

VERSION:3.0

N:Gump;Forrest

FN:Forrest Gump

ORG:Bubba Gump Shrimp Co.

TITLE:Shrimp Man

PHOTO;VALUE=URL;TYPE=GIF:http://www.example.com/dir_photos/my_photo.gif

TEL;TYPE=WORK,VOICE:(111) 555-1212

TEL;TYPE=HOME,VOICE:(404) 555-1212

ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America

LABEL;TYPE=WORK:100 Waters Edge\nBaytown, LA 30314\nUnited States of America

ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America

LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America

EMAIL;TYPE=PREF,INTERNET:forrestgump@example.com

REV:2008-04-24T19:52:43Z

END:VCARD

 

-----------

BEGIN:VCARD
VERSION:3.0
N:Madsen;Leif
FN:Leif Madsen
ORG:LeifMadsen Enterprises, Inc.
TITLE:Asterisk Consultant and Author
TEL;TYPE=WORK,VOICE:+14164790259
EMAIL;TYPE=PREF,INTERNET:leif@leifmadsen.com
URL:http://www.leifmadsen.com
X-SIP:sip:leif@leifmadsen.com
REV:20100426T103000Z
END:VCARD

--------------------

2. In blocks the function for creating a QR Code is qrcode. The value in this instance would be the VCard code.

In Blocks the QR Code value will look as follows:

BEGIN:VCARD

VERSION:3.0

N:{First Name};{Last Name}

FN:{First Name} {Last Name}

ORG:{Organization}

TITLE:{Title}

PHOTO;VALUE=URL;TYPE=JPG:{Photo}

TEL;TYPE=WORK,VOICE:{Tel (Work)}

TEL;TYPE=HOME,VOICE:{Tel (Home)}

ADR;TYPE=WORK:;;

LABEL;TYPE=WORK:

EMAIL;TYPE=PREF,INTERNET:{Email}

END:VCARD

3. In Blocks the {} brackets represent other blocks so you will need to create other blocks so that users will be able to input their information which will then get passed to the qrcode.

 

4. See the example pdf provided called QR Vcard.pdf for full functionality.

PART B

Creating a business card with text and qr code

In this example we not only want to create a qr code image but we want to also display the text on the  business card as well.

In order to do that we have to bear in mind that using the prefix and postfix function will disrupt the QR Code format. So in order to accomplish this we must create one block to take the information which will have no formatting applied to it so as to use it in the qrcode. The other block will be used to take the first block and apply any formatting necessary.

In the example supplied (QR Vcard Business Card.pdf), First Name, Last Name and Email require no formatting so those blocks are used both in the QR Code and in the Business Card Paragraph. On the other hand, the phone numbers and other blocks have <nextline>'s applied to them as well as formatting for numbers and prefixes.  Those blocks are used in the paragraph where as the original blocks can go in the QR Code.

 

QR Code Block

BEGIN:VCARD

VERSION:3.0

N:{First Name};{Last Name}

FN:{First Name} {Last Name}

ORG:{Organization}<nextline>TITLE:{Title}

PHOTO;VALUE=URL;TYPE=JPG:{Photo}

TEL;TYPE=WORK,VOICE:{Work}

TEL;TYPE=HOME,VOICE:{Home}

ADR;TYPE=WORK:;;

LABEL;TYPE=WORK:

EMAIL;TYPE=PREF,INTERNET:{Email}

END:VCARD

Paragraph Block

{First Name} {Last Name}<nextline>{BC-Title}<nextline><nextline>{BC-Organization}{BC-Work}{BC-Home}{BC-Fax}{Email}

----------------------------------------------

Other websites with resrouces which are good to know

https://vcardmaker.com/

https://tools.ietf.org/html/rfc6350

http://www.w3.org/2002/12/cal/vcard-notes.html

http://www.evenx.com/vcard-3-0-format-specification

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article