View Single Post
Old January 11th, 2016, 03:17 PM
Alex Marshall's Avatar
Alex Marshall Alex Marshall is offline
FusionPro VDP Support
Join Date: Sep 2008
Location: Chicago,Illinois
Posts: 378
Default Re: Multiple fields in data matrix

Creating a Data Matrix barcode is simple. You have to know which encoding mode you need and use it in the script.
Here is the syntax:

return MakeDataMatrixBarcode(DataToEncode, ProcessTilde, EncodingMode,PreferredFormat, PointSize, NoFontTag, Font)

So click “Create Rules>>New(text)>>>Empty Rule. Give the Rule a name.
Enter the code. Change the fieldname to match your data file.

var dataforbarcode = Field(“mydatafield”);//etc…
var dmbarcodeobj = new DataMatrixBarcode;
dmbarcodeobj.encodingmode = "base256";
dmbarcodeobj.pointSize = 12;
return dmbarcodeobj.Make(dataforbarcode);

• Data – The data that will be encoded. This can be one or more fields from your data, a result of another rule, etc.
• Process Tilde – When set to "true", the format ~ddd is used to specify the ASCII code ofthe encoded character. For example, if the following text is entered in the Data field,
~029AB it will be encoded as GSAB where GS is a delimiter ASCII 29 character. This can be used in a single string to encode GS and RS characters (GS = ASCII 29 and RS =ASCII 30). Other commonly used ASCII codes are ~009 for a tab and ~013 which is a return function. These are useful when encoding multiple fields in a single symbol. Thedefault is false.
• Encoding Mode –
There are four encoding methods:
• ASCII – encodes data that contains the first 128 ASCII characters.
• C40 – encodes data that contains numeric and upper case characters.
• TEXT –encodes data that contains both numeric and lowercase characters.
• BASE256 – encodes 8 bit values.

Now insert this Rule from the “Variable” drop box in the Variable Text Editor.
Do not apply the font. The script will return the font. Test and compose.
Reply With Quote