FAQ TBarCode/X - Barcode Software for Mac OS X ® , UNIX ® , Linux ®
How to Generate Swiss QR Code in a PCL Print Job?
How to Generate Swiss QR Code in a PCL Print Job?
To generate a Swiss QR Code, add the following control sequences to your PCL File:
- Start of the barcode: $_tbcs -fPCL -b126 -w46 -h46 -eon -d
- Then the data in double quotes: "<Data structure according to SIXX specification 2.2>"
- The end of barcode: $_tbce
Example of Swiss QR Code (the line feeds are encoded with \n):
$_tbcs -fPCL -b126 -w46 -h46 -eon -d"SPC\n0200\n1\nCH4431999123000889012\nK\nRobert Schneider AG\nRue du Lac 1268\n2501 Bile\n\n\nCH\n\n\n\n\n\n\n\n123.59\nCHF\nK\nPia-Maria Rutschmann-Schnyder\nGrosse Marktgasse 28\n9400 Rorschach\n\n\nCH\nQRR\n210000000003139471430009017\nInstruction of 15.09.2019\nEPD"$_tbce
- To see the Swiss cross in the middle of the barcode, switch to PCL5noHPGL. This can be done either in the prefix parameters with --pclmode=PCL5noHPGL (e.g. insert after -fPCL) or permanently in the tbarcode.conf file with pclmode=PCL5noHPGL (insert additional line at the end).
- The data is transferred as ANSI ⁄ Latin-1, but encoded as UTF-8 in the barcode. The UTF-8 encoding is generated internally by the barcode generator.
- The barcode generator has a built-in validation, i.e. if the data structure does not match the specification, an error is output on stderr (as well as an exit code <>0). If required, tracing can be activated in tbarcode.conf.
- By default, a relative insertion position is used. Optionally, you can still control the exact position absolutely or change the origin - see User Manual: --pos --xpos --ypos --origin.
- This Excel-Sheet may help you to create the data structure: https://www.tec-it.com/Download/Samples/Swiss_QR-Bill_V2.zip.
- The existing demo version can be used for testing without any restrictions. The final activation is done via a license file (no new installation necessary).