Jump to content

QR codes in DSF


jorgenbackus

Recommended Posts

Hi,

 

Maybe this is not a topic for this forum, but I'll give it a shot:

 

In FusionPro I created a template for a business card with a QR-code on it. Because the QR-code has to be green, I used the text-variant, using this code

 

var EncodingMode = "String";
var ErrorCorrectionMode = "L";
var PreferredFormat = "0";
var PointSize = "4";
var NoFontTag = false;
var Font = "IDAutomation2D";
var ProcessTilde = false;



var FieldOrRuleToEncode =

   "BEGIN:VCARD\n"+
   "VERSION:3.0\n"+
   "N:"  +Field("Achternaam") + ";" + Field("Voornaam")  + "\n"+
   "ADR;TYPE=WORK:"+ ";;" + Rule("getStraat") + ";" + Rule("getStraatPostcode") + ";;"
                           + Rule("getStraatPlaats") + ";" + Rule("getStraatLand")+"\n"+
   "ADR;TYPE=OTHER:"+ ";;" + Rule("getPostbus") + ";" + Rule("getPostbusPostcode") + ";;"
                           + Rule("getPostbusPlaats") + ";" + Rule("getPostbusLand")+"\n"+
   "TEL;TYPE=cell:"+ Field("Mobiel")+"\n"+
   "TEL;TYPE=work:"+ Field("tel. Werk")+"\n"+
   "TEL;TYPE=fax:"+ Field("Fax werk")+"\n"+
   "EMAIL;TYPE=WORK:"+ Field("E-mail")+"\n"+
   "URL:"+ Field("URL")+"\n"+
   "ORG:" + Rule("getBusiness")+"\n"+
   "TITLE:"+ Field("Functie")+"\n"+
   "END:VCARD";



//return FieldOrRuleToEncode;
var DataToEncode = FieldOrRuleToEncode;
return MakeQRBarcode(DataToEncode, ProcessTilde,
         EncodingMode, ErrorCorrectionMode, PreferredFormat,
         PointSize, NoFontTag, Font);

 

There is a drop-down menu so the customer can pick his address which is filled out automatically. That's why there are "+rule" in this code.

 

Offline this works great. But when I create a template, upload it to DSF and generate a business card in DSF, I can't read the QR-code anymore.

 

Maybe this is related to the character-set?

Link to comment
Share on other sites

It's hard to say without, at the very least, seeing the data from both the off-line and DSF compositions to compare them. Can you add a line like this before the "return" line?

Print(DataToEncode);

And then post the log (.msg) file from each composition?

 

Or at least set that raw data as text, and post the output from each?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...