I am planning to write a lot of letters in the near future. Since I am going to prepare the letters with LaTeX I also want to print the envelope addresses with it. All the address information is in a vCard file. Is there an easy way to read the addresses and print them on an envelope (By easy I mean: Has anyone already done it before)? Basically, vCard data is similar to csv data but differs in its regularity. If not, what would be the best solution?

The only question regarding vCards is this one: Problem creating a proper qrcode with vcard info. It looks like I cannot use my raw address data without reformatting first.

Another question uses addresses in a custom format: How to print addresses. Should I just try to export the addresses with a different tool?

Here is an example of how my vCard data looks like (I deleted some unrelated lines):

PRODID:-//ownCloud//NONSGML Contacts 0.3//EN
FN:John Doe
ADR;TYPE=HOME:;;Ivory Road 31;Capetown;;123456;
  • 2
    I would say that TeX/LaTeX isn't really good in reading such structured data unless you write a parser of your own
    – user31729
    Oct 6, 2015 at 14:18
  • 1
    I agree with @ChristianHupfer and would recommend this architecture: use a language that has support for reading vCards and emit each address like \vcard{Doe}{John}{Ivory Road 31}{Capetown}{123456}. Then write a LaTeX document that implements a \vcard command that typesets the address. This keeps the two problems separate: reading the vCard format and typesetting addresses. Oct 6, 2015 at 14:30

1 Answer 1


enter image description here

If the vcard is in jd.txt then

\immediate\read\vcardin to \tmp





  • Wow, I did not expect to get a working answer after the comments above. Is it also possible to create multiple output files with multiple address files in the folder?
    – mrub
    Oct 8, 2015 at 14:14
  • @mrub no tex can't do multiple output. If you know each letter is 1-page you can do one per page then use an external pdf chop tool to split it up. (multiple input is OK) Oct 8, 2015 at 15:59
  • Since I want to print the addresses on envelopes I could just make one file with as many pages as I have recipients? This should be even better because I only have to print one file…
    – mrub
    Oct 8, 2015 at 16:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .