Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Line breaks in vCard for QR Codes
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
York Simon  
View profile  
 More options Jan 10, 9:50 am
From: "York Simon" <si...@stober.de>
Date: Tue, 10 Jan 2012 15:50:00 +0100
Subject: Line breaks in vCard for QR Codes

Hello Terry,

I have integrated the Postscript Barcode Generator in Acrobat Distiller, and I've started a few successful attempts to QRCode.
Now I want to encode the vCard format in QR Code. For doing so I send the following line to my installed PostScript Barcode Generator:

10 10 moveto (BEGIN:VCARD^092^110VERSION:2.1^092^110FN:Yo Yosimo^092^110N:Yosimo;Yo^092^110TEL;CELL:098712345678^092^110TEL;HOME;VOIC E:+4912345678911^092^110TEL;HOME;FAX:+4912345678922^092^110EMAIL:yos...@yosimo.de^092^110URL;HOME:http://www.yosimo.de^092^110ADR;HOME:;;Yosimostreet 12;Munich;;80539;Germany^092^110NOTE:My notice^092^110ORG:Yosimo AG^092^110URL;WORK:http://www.yosimo.de^092^110END:VCARD) (parse) /qrcode /uk.co.terryburton.bwipp findresource exec

I have difficulties to define the line breaks of the vCard formats.
Usually I use the sign \n (backslash + n, ASCII-code  ^092^110) and set the "parse" option.

But the generator is not interpreted as a newline.
How do I correct specify the line break for the Barcode Generator?

Regards
Yosimo

p.s.
I'm a member of your google postscriptbarcode forum, but there is no "New topic" button like in the other google forums where I'm also a member and the answer button is greyed out/non klickable.
Is this normal?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯  
View profile  
 More options Jan 10, 10:14 am
From: Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <da...@cpan.org>
Date: Tue, 10 Jan 2012 16:14:32 +0100
Local: Tues, Jan 10 2012 10:14 am
Subject: Re: [postscriptbarcode] Line breaks in vCard for QR Codes

It is entirely possible to avoid the "parse" option. Simply use literal
line feeds.

0 0 moveto (BEGIN:VCARD
VERSION:2.1
FN:Yo Yosimo
N:Yosimo;Yo
TEL;CELL:098712345678
TEL;HOME;VOICE:+4912345678911
TEL;HOME;FAX:+4912345678922
EMAIL:yos...@yosimo.de
URL;HOME:http://www.yosimo.de
ADR;HOME:;;Yosimostreet 12;Munich;;80539;Germany
NOTE:My notice
ORG:Yosimo AG
URL;WORK:http://www.yosimo.de
END:VCARD
) ( ) /qrcode /uk.co.terryburton.bwipp findresource exec showpage

In the packed notation, 0a denotes a line feed character. The following
is one long line, my mail client will probably wrap it.

0 0 moveto
<424547494e3a56434152440a56455253494f4e3a322e310a464e3a596f20596f73696d6f0a 4e3a596f73696d6f3b596f0a54454c3b43454c4c3a3039383731323334353637380a54454c3 b484f4d453b564f4943453a2b343931323334353637383931310a54454c3b484f4d453b4641 583a2b343931323334353637383932320a454d41494c3a796f73696d6f40796f73696d6f2e6 4650a55524c3b484f4d453a687474703a2f2f7777772e796f73696d6f2e64650a4144523b48 4f4d453a3b3b596f73696d6f7374726565742031323b4d756e6963683b3b38303533393b476 5726d616e790a4e4f54453a4d79206e6f746963650a4f52473a596f73696d6f2041470a5552 4c3b574f524b3a687474703a2f2f7777772e796f73696d6f2e64650a454e443a56434152440 a>
( ) /qrcode /uk.co.terryburton.bwipp findresource exec showpage

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
York Simon  
View profile  
 More options Jan 11, 1:11 am
From: "York Simon" <si...@stober.de>
Date: Wed, 11 Jan 2012 07:11:47 +0100
Local: Wed, Jan 11 2012 1:11 am
Subject: Line breaks in vCard for QR Codes
Hi Lars,

thank you for your answer.
Simply use literal line feeds is ok and works well.

But I will personalize many QR Codes from a CSV file.
I'm printing out from a personalization software, which interprets each line of the CSV file as a separate record/QR Code.
Therefore I am searching for a solution to put the line break as a code in the CSV file to obtain a one-liner that is used by the PostScript Barcode Generator implemented accordingly.

It does not matter to use the "parse" option if it would work with it.

Thanks for the packed notation - it works also well. How did you generate the packed notation?

Regards
Yosimo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯  
View profile   Translate to Translated (View Original)
 More options Jan 11, 8:27 am
From: Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <da...@cpan.org>
Date: Wed, 11 Jan 2012 14:27:58 +0100
Local: Wed, Jan 11 2012 8:27 am
Subject: Re: [postscriptbarcode] Line breaks in vCard for QR Codes

> put the line break as a code in the CSV file

CSV does not *escape* line feed characters like e.g. C does, it *quotes*
fields as a whole instead. Familiarise yourself with the file format
and its rules by reading the relevant RFC. The following program outputs
a standard compliant file, inspect it and pay attention how the LF in
the data fields differ from the record separating CR LF. Try opening it
in LibreOffice, too.

    #!/usr/bin/env perl
    use utf8;
    use Text::CSV_XS qw();
    use autodie qw(:all);
    my $vcf = <<'VCF';
    BEGIN:VCARD
    ⋮
    END:VCARD
    VCF

    my $csv = Text::CSV_XS->new({
        binary => 1,
        eol => "\r\n",
        always_quote => 1,
        auto_diag => 2,
    }) or die Text::CSV_XS->error_diag;
    open $fh, '>:encoding(UTF-8)', 'vcards.csv';
    $csv->print($fh, $_) for (
        [23,42,1337,$vcf,qw(foo bar baz)],
        [1,2,3,$vcf,qw(quux xyzzy zot)],
    );
    close $fh;

> How did you generate the packed notation?

With unpack. 0a is the cardinal of the codepoint of the LF character
in hexadecimal.

<http://p3rl.org/PostScript::Barcode#pack_data>
<http://kobesearch.cpan.org/htdocs/PostScript-Barcode/Barcode.pm.html#...>
<http://p3rl.org/unpack>

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »