V Card QR Code with xmpie

1,164 views
Skip to first unread message

amram benquesus

unread,
Nov 15, 2011, 11:55:12 PM11/15/11
to XMPie Interest Group
i am trying to create a vcard. in xmpie would i configure as follows:
XMP2DQRCode(“VCARD:N:” & |->First &”,”& |->Last & “ORG:” & |->Website
& “END:VCARD” /*, advancedParametersString */)

Does this make sense?
I know that it is best not to use the vcard and create a purl etc...
but for now i need to know how to do the vcard. if anyone can help
that would be helpful.

amram

couch

unread,
Nov 16, 2011, 12:15:19 AM11/16/11
to XMPie Interest Group
This website shows the parameters necessary to create a vcard:
http://en.wikipedia.org/wiki/VCard

For instance, you are missing the BEGIN:VCARD
at the very beginning...

amram benquesus

unread,
Nov 16, 2011, 12:21:33 AM11/16/11
to XMPie Interest Group

thank you for your response, i see that i missed the begin but my
question really is how do i get the nextlines. when i read all those
articles they display the text in separate rows. how do i do that in a
string in xmpie. do i need line breaks or is it the way i did it
putting spaces between the ador and the title of the next line?

BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
TEL;TYPE=WORK,VOICE:(111) 555-1212
ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of
America
EMAIL;TYPE=PREF,INTERNET:forre...@example.com
REV:20080424T195243Z
END:VCARD

couch

unread,
Nov 16, 2011, 1:50:38 AM11/16/11
to XMPie Interest Group
Well, here is the QLingo in uPlan that works for me:

XMP2DQRCode(
"BEGIN:VCARD\r" &
"VERSION:2.1\r" &
"N:" & |->[Last Name] & "; " & |->[First Name] & "\r" &
"FN:" & |->[First Name] & " " & |->[Last Name] & "\r" &
"ORG:" & |->[Company] & "\r" &
"TITLE:" & |->[Position] & "\r" &
"TEL;WORK;VOICE:" & |->[Telephone] & "\r" &
"EMAIL;PREF;INTERNET:" & |->[e-mail] & "\r" &
"END:VCARD"
)

Mark Rawlins

unread,
Apr 2, 2023, 8:12:38 PM4/2/23
to XMPie Interest Group
Hi All
I have successfully used the above code to create QR codes on some business cards (using VERSION:4.0 instead of 2.1) and they import correctly to Apple phones. However when we try to use them on an Android phone, they give an error. Could you tell me if there is something else we need to do for Android phones?
Here is my code in uPlan

XMP2DQRCode
(
"BEGIN:VCARD\r" &
"VERSION:4.0\r" &
"N:" & |->[LastName] & "; " & |->[FirstName] & "\r" &
"FN:" & |->[FirstName] & " " & |->[LastName] & "\r" &

"ORG:" & |->[Company] & "\r" &
"TITLE:" & |->[Position] & "\r" &
"TEL;TYPE=Mobile:" & |->[Mobile] & "\r" &
"EMAIL:" & |->[Email] & "\r" &
"URL:" & |->[URL] & "\r" &
"END:VCARD"
)

Thanks

couch

unread,
Apr 2, 2023, 8:19:37 PM4/2/23
to XMPie Interest Group
Refer to this thread:https://groups.google.com/g/xmpie-users/c/t_gf2Jvmifs/m/LfTcWAReAwAJ
There is a sample that works on Google Pixel 7 Pro - but as stated in that thread - the ability to read the VCARD is dependent on the scanner - IE the phone and the software that is doing the scanning.

Tom Gooding

unread,
Apr 4, 2023, 10:26:49 AM4/4/23
to XMPie Interest Group
IIRC, changing the carriage returns (\r) to newlines (\n) worked for us on Android phones.

couch

unread,
Apr 5, 2023, 8:19:33 PM4/5/23
to XMPie Interest Group
That's great feedback Tom! 
I can confirm that \n or \r\n will work on Pixel 7 Pro. 
Also, taking a closer look at the code sample,  XMP2DQRCode() is an old function. The correct function for anything but really old versions is:

XMPBarcode("QRCode",
"BEGIN:VCARD\r\n" &
"VERSION:4.0\r\n" &
"N:" & |->[LastName] & "; " & |->[FirstName] & "\r\n" &
"FN:" & |->[FirstName] & " " & |->[LastName] & "\r\n" &
"ORG:" & |->[Company] & "\r\n" &
"TITLE:" & |->[Position] & "\r\n" &
"TEL;TYPE=Mobile:" & |->[Mobile] & "\r\n" &
"EMAIL:" & |->[Email] & "\r\n" &
"URL:" & |->[URL] & "\r\n" &
"END:VCARD", "")

mraw...@immij.com

unread,
Apr 5, 2023, 8:32:17 PM4/5/23
to XMPie Interest Group
Thanks for the great suggestions Couch and Tom. Much appreciated. I will give them a go and see if we can get some progress.

Thanks again.

Reply all
Reply to author
Forward
0 new messages