I would like to put a QRCode that contains contact information (VCard). However I don't know how to encode the newline character so VCard is correctly read.
Here is a sample document with QRCode without newline chars (UPDATED: I changed the example to one from de.wikipedia.org, because my iphone qrcode reader does not properly processes the example from en.wikipedia.org)):
\documentclass{article}
\usepackage{pst-barcode}
\begin{document}
\begin{pspicture}(1in,1in)
\obeylines
\psbarcode{%
BEGIN:VCARD
VERSION:3.0
N:Mustermann;Max
FN:Max Mustermann
ORG:Wikipedia
URL:http://de.wikipedia.org/
EMAIL;TYPE=INTERNET:max.mustermann@example.org
TEL;TYPE=voice,work,pref:+49 1234 56788
ADR;TYPE=intl,work,postal,parcel:;;Musterstraße 1;Musterstadt;;12345;Germany
END:VCARD
}{width=2.0 height=2.0}{qrcode}%
\end{pspicture}
\end{document}
I have found a similar question on tug.org, the conclusion was that you need to modify the generated PostScript. I wonder if there is another solution.
\setbox0\hbox{…}where…stands for the entirepspictureenvironment, and then use\box0in the tabular. (Note that the standard LaTeX commands\saveboxand\sboxalso scan their argument before executing, which is why I resort to TeX primitives here.) – Harald Hanche-Olsen Jun 12 '11 at 19:10\obeylinesand the definition of^^Mand instead manually insert^^Jat the end of each line of the vcard. – Harald Hanche-Olsen Jun 12 '11 at 19:18advance par@deathcycles @nefollowed by what is, indeed, stated. Trying (to)Open contact, returns Can't open this contact card because it's damaged. Is it the size of generated (square) QR code (I measured it to be 2.9cm^2 on paper)? – Nikos Alexandris Sep 06 '12 at 20:57\show^^Mjust after\obeylines? The expected answer is^^M=\par. – Harald Hanche-Olsen Sep 07 '12 at 09:55\documentclass[11pt,a4paper]{memoir}and\usepackage{pstricks},\usepackage{pst-barcode}once using Kile (LaTeX > ForwardDVI) and once using LyX (View DVI). They do not generate the same QR code. Kile provides a working code while LyX gives a more "complex" result and non-working, i.e. it throws out the errors previously mentioned. So it's me to blame (mis-)using LyX (?). – Nikos Alexandris Sep 09 '12 at 10:03