CTAN Comprehensive TeX Archive Network

Direc­tory macros/xetex/latex/businesscard-qrcode

README.md

Busi­ness­card with QR-Code

What hap­pens, if you give your vis­it­ing card to some­one? Either he man­u­ally types the text into his com­puter or mo­bile­fone, or it will end up in a box and be for­got­ten. Nowa­days data is re­quired elec­tron­i­cally, not on pa­per. Here is the so­lu­tion: A vis­it­ing card with QR-Code that con­tains a full vcard, so that it can be scanned with an app on the mo­bile­fone and there­fore au­to­mat­i­cally im­ported into the elec­tronic con­tacts. This also works well, when you are of­fline and blue­tooth trans­fer fails. So here is the highly con­fig­urable busi­nescard or vis­it­ing­cards with full vcard as QR-Code, ready to send to on­line print­ers. You can spec­ify the ex­act size of the pa­per and the con­tent within the pa­per, in­lud­ing gen­er­a­tion of crop marks.

Other avail­able vis­it­ing­card tem­plates, such as mschlenker dis­tribute the cards on an A4 pa­per. But if you want a pro­fes­sional printer, such as on­lineprint­ers, then you need to be able to gen­er­ate a PDF with ex­actly one card, an ex­actly de­fined bor­der and crop marks.

Example: John Doe from Hongkong Example: Businesscard of Peter Muster from Zürich Example: Nearly Real Examle Of My Card

Fea­tures

  • all in­for­ma­tion is in the QR-Code
  • full pri­vacy con­trol: in­put is op­tional, spec­ify only what you need, you de­cide what in­for­ma­tion to share, e.g. I print three cards, with phone and ad­dress, with­out ad­dress and only with elec­tron­i­cal con­tacts, no phone nor ad­dress
  • op­tional icons, op­tional small hint texts
  • sev­eral align­ments
  • freely de­fined size of pa­per and con­tent
  • sup­ports hon­oric ti­tles, full names, ad­dress with post of­fice box and ex­tended in­for­ma­tion
  • sup­ports tele­fone, email, jab­ber and ma­trix chat
  • sup­ports sev­eral urls for your hom­pages
  • sup­ports gitea, github, git
  • sup­ports face­book, twit­ter, google+, youtube, wikipedia
  • sup­ports pgp key url and fin­ger­print
  • sup­ports nextcloud fed­er­a­tion id

Usage

In­stal­la­tion

Copy businesscard-qrcode/businesscard-qrcode.cls to your class path. Sim­plest way for in­stal­la­tion on Linux:

mkdir ~/texmf/tex/latex/businesscard-qrcode
cp businesscard-qrcode/businesscard-qrcode.cls ~/texmf/tex/latex/businesscard-qrcode/

Com­pi­la­tion

Im­por­tant: You must use xelatex for com­pi­la­tion, be­cause xelatex prop­erly sup­ports UTF-8 (e.g. needed for ger­man um­lauts or chi­nese char­ac­ters). The pack­age inputenc messes up with pack­age qrcode.

Doc­u­ment Struc­ture

\documentclass[<layout-options>]{businesscard-qrcode}

<data-definitions>

\begin{document}
	\drawcard
\end{document}

where <layout-options> and <data-definitions> are ex­plained be­low.

Lay­out Op­tions

Lay­out op­tions are set as op­tions to the \documentclass, e.g.:

\documentclass[textwidth=0.7,qrwidth=0.25,www,nofill,iconright,rightalign,hint,icon,textfirst]{businesscard-qrcode}

Avail­able Op­tions:

  • paperwidth=: width of the phys­i­cal pa­per where the card is printed on (incl. bor­der), de­fault: 89mm
  • paperheight=: height of the phys­i­cal pa­per where the card is printed on (incl. bor­der), de­fault: 59mm
  • contentwidth=: width of the card's con­tent with­out the bor­der that is cut, de­fault: 85mm
  • contentheight=: height of the card's con­tent with­out the bor­der that is cut, de­fault: 55mm
  • fontsize=: any font­size al­lowed in extarticle, that are 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt and 20pt, de­fault: 8pt
  • padding=: padding within the card's con­tent, de­fault: 2mm
  • cutdist=: dis­tance in mm where the cut marks are set, de­fault: 2
  • cutlen=: length of the cut marks in mm, de­fault: 1
  • textwidth=: rel­a­tive width of the text block 1 means full width, so qrwidth plus textwidth should be smaller than 1 the re­mainig space is left empty be­tween the text and QR-Code, de­fault: 0.55 (that's 55% of the avail­able space)
  • qrwidth=: rel­a­tive width of the QR-Code 1 means full width, so qrwidth plus textwidth should be smaller than 1 the re­mainig space is left empty be­tween the text and QR-Code, de­fault: 0.40 (that's 40% of the avail­able space)
  • lang=: lan­guage of the wikipedia page, will be prepended be­fore wikipedia.org, e.g. de.wikipedia.org, de­fault: de
  • addressor noaddress: dis­able ren­der­ing of the ad­dress in text and QR-Code, de­fault: ad­dress
  • hint or nohint: show the lit­tle text hints, de­fault: hint
  • icon or noicon: show the icons, de­fault: icon
  • rightalign or leftalign: align text left or right, de­fault: rightalign
  • iconleft or iconright: show icon left or right of the text, de­fault: iconleft
  • fill or nofill: fill empty space be­tween icon and text, de­fault: fill
  • qrfirst or textfirst: switch po­si­tion of QR-Code and text block, de­fault: qrfirst
  • https or www: should links in the hints be pre­fixed with https:// or www., de­fault: https

Data Def­i­ni­tions

Your data is en­tered with com­mands in the doc­u­ment, e.g.:

\email{name@example.com}

Im­por­tant:: Spaces must be es­caped by a back­slash \ in all data def­i­ni­tions, if they should be kept in the QR-Code. This is a lim­i­ta­tion of the qrcode-pack­age- Without es­cap­ing \, spaces are show in the text block, but not in the QR-Code. You may make use of this fea­ture, if you do not es­cape the spaces in \phone and \pgpfingerprint, but ev­ery­where else. This way, phone num­ber and pgp fin­ger­print are con­densed in the QR-Code.

See this ex­am­ple

\givennames{Juan\ Pablo}
\familynames{Martínez\ Escudero}
\additionalnames{Example\ Company\ Ltd.}
\street{Im\ Stutz\ 123}
\pobox{Postfach\ 4567}
\phone{+41 52 123 45 67}
\pgpurl{https://pgp.mit.edu/pks/lookup?op=get\&search=0xF62315D04D4C0C62}

Rec­og­nized Com­mands:

  • \type: ei­ther home or work for per­sonal or busi­ness cards
  • \givennames: your first name and even­tual mid­dle names
  • \familynames: your fam­ily names
  • \honoricprefix: hon­orix name pre­fixes, e.g. aca­demic ti­tles
  • \honoricsuffix: hon­oric name suf­fixes
  • \additionalnames: ad­di­tionl names — I use it for the com­pany name in busi­ness cards
  • \pobox: post of­fice box
  • \extaddr: ad­dress ex­ten­sion, e.g. name of a build­ing or floor num­ber
  • \street: street and num­ber of the ad­dress
  • \city: name of the ad­dress lo­ca­tion
  • \region: re­gion of the ad­dress
  • \zip: zip code of the ad­dress
  • \country: full name of coun­try of the ad­dress in the lan­guage of the card
  • \phone: your phone num­ber, the phone is marked as mo­bile, so to be used for voice and text (SMS)
  • \email: your email ad­dress
  • \jabber: your jab­ber or xmpp chat ad­dress
  • \matrixorg: your ma­trix chat ad­dres, hint: use riot mes­sen­ger for ma­trix
  • \cloud: your nextcloud fed­er­a­tion id — the url is prepended au­to­mat­i­cally
  • \homepage: url to a web site with «home» icon — with­out https:// not www (un­less it is re­quired), this is prepended au­to­mat­i­cally
  • \world: url to a web site with «world» icon — with­out https:// not www (un­less it is re­quired), this is prepended au­to­mat­i­cally
  • \link: url to a web site with «link» icon — with­out https:// not www (un­less it is re­quired), this is prepended au­to­mat­i­cally
  • \wordpress: url to a web site with «word­press» icon — with­out https:// not www (un­less it is re­quired), this is prepended au­to­mat­i­cally
  • \drupal: url to a web site with «» icon — with­out https:// not www (un­less it is re­quired), this is prepended au­to­mat­i­cally
  • \joomla: url to a web site with «joomla» icon — with­out https:// not www (un­less it is re­quired), this is prepended au­to­mat­i­cally
  • \wikipedia: if you or your com­pany have a wikipedia en­try, spec­ify doc­u­ment­class op­tion lang for the lan­guage of you en­try and use this def­i­ni­tion for the name of your page — the url is prepended au­to­mat­i­cally
  • \git: the url of your git repos­i­tory — with­out https:// not www (un­less it is re­quired), this is prepended au­to­mat­i­cally
  • \gitea: the url of your gitea project page, you can use this tag also for other project man­age­ment sites, such as gogs — with­out https:// not www (un­less it is re­quired), this is prepended au­to­mat­i­cally
  • \github: your ac­count name on github — only the name of the ac­count, the url is prepended au­to­mat­i­cally
  • \facebook: your ac­count name on face­book or the name of your page — only the name of the ac­count or page, the url is prepended au­to­mat­i­cally
  • \twitter: your ac­count name on twit­ter — only the name of the ac­count, the url is prepended au­to­mat­i­cally
  • \youtube: your ac­count name on youtube — only the name of the ac­count, the url is prepended au­to­mat­i­cally
  • \google: your ac­count name on google+ — only the name of the ac­count, the url is prepended au­to­mat­i­cally
  • \pgpurl: the full url to your pgp pub­lic key (only added to the QR-Code, not shown in the text)
  • \pgpfingerprint: the fin­ger­print of your pgp pub­lic key

Print the Card

The card is de­signed for pro­fes­sional print­ing ser­vice, such as on­lineprint­ers. Please check the card and the QR-Code well be­fore you pay money for print­ing! Choose a for­mat, de­fault is 89mm×59mm with 2mm boder, so the card con­tent is 85mm×55mm. But the card can be adapted to any other print­ing for­mat. To print cards of size 10cm×5cm with 2mm cut, you spec­ify, e.g.:

\documentclass[paperheight=5.4cm,paperwidth=10.4cm,
               contentheight=5cm,contentwidth=10cm,
               cutdist=2]
               {businesscard-qrcode}
example with special paper size

Usage Ex­am­ple

In­clude the doc­u­ment­class, de­fine your data and add the doc­u­ment en­vi­ron­ment:

\documentclass{businesscard-qrcode}

\type{home}
\givennames{An}
\familynames{Example}
\street{Einbahnstrasse\ 84}
\city{Irgendwo}
\zip{1001}
\country{Switzerland}
\homepage{example.com}
\email{name@example.com}

\begin{document}
	\drawcard
\end{document}

Save it as file texs­tu­diod30266.tex and com­pile it to get

xelatex -synctex=1 -interaction=nonstopmode texstudio_d30266.tex
the visiting card resulting from the usage example

See ex­am­ples for more ex­am­ples.

Need More

If you are miss­ing a fea­ture or a con­fig­u­ra­tion op­tion, con­sult the project page. Just open a ticket and the au­thor will care about it. Or ex­tend it, it's lgpl.

Down­load the con­tents of this pack­age in one zip archive (557.6k).

busi­ness­card-qr­code – Busi­ness cards with QR-Code

What hap­pens when you give your vis­it­ing card to some­one? Either they man­u­ally type the text into their com­puter or mo­bile phone, or it will end up in a box and be for­got­ten. Nowa­days data is re­quired elec­tron­i­cally, not on pa­per. Here is the so­lu­tion: A vis­it­ing card with QR-Code that con­tains a full vcard so that it can be scanned with an app on the mo­bile phone and thereby au­to­mat­i­cally im­ported into the elec­tronic con­tacts. This also works well when you are of­fline and blue­tooth trans­fer fails. So here is the highly con­fig­urable busi­ness card or vis­it­ing card with full vcard as QR-Code, ready to send to on­line print­ers. You can spec­ify the ex­act size of the pa­per and the con­tent within the pa­per, in­lud­ing gen­er­a­tion of crop marks.

The pack­age de­pends on the fol­low­ing other pack­ages: calc, crop, De­jaVuSans, etool­box, fontawe­some, fontenc, ge­om­e­try, kvop­tions, mar­vosym, qr­code, var­width, and wrap­fig.

The pack­age needs XeLaTeX for work­ing prop­erly.

Pack­agebusi­ness­card-qr­code
Bug trackerhttps://mrw.sh/tem­plates/busi­ness­card-qr­code/is­sues
Re­pos­i­toryhttps://mrw.sh/tem­plates/busi­ness­card-qr­code
Ver­sion1.2 2018-08-15
Li­censesGNU Lesser Gen­eral Public Li­cense
Main­tainerMarc Wäck­er­lin
Con­tained inTeX Live as busi­ness­card-qr­code
MiKTeX as busi­ness­card-qr­code
Topics
File card
Class
QR Code
...
Guest Book Sitemap Contact Contact Author