Programmer's Guide User guide

1 | Programmer’s Guide
Thermal Printer Programmer’s Guide 18
Select Barcode Ratio
The following command will set the wide-to-narrow bar ratio.
<ESC>$b#R 0x1b 0x24 0x62 <value> 0x52
The value of ‘#’ may be one of the following:
1 = 2:1
2 = 7:3
3 = 5:2
4 = 3:1
Any other value will default to the standard ratio of the currently selected barcode. This
command only affects Code 3 of 9 and Interleaved 2 of 5.
Print Barcode Data
The following command will use the provided data in this sequence to print the currently
selected barcode.
<ESC>$b#W 0x1b 0x24 0x62 <value> 0x57
The number of data bytes is specified in the <value> parameter field. As an example:
<ESC>$b1000C <ESC>$b10W1234567890THIS IS A BARCODE
The following condensed command is also valid:
<ESC>$b1000c10W1234567890THIS IS A BARCODE
Either command will select the Code 39 Barcode as the default barcode then send the
10 characters following the barcode selection command to the Code 39 module for
rendering at the current cursor position. It will be followed by the text “This is a Barcode”
using the currently selected font (not the autoprint typeface). A width value of zero will
trigger the data scanning process to read barcode data until the barcode data delimiter is
encountered. Refer to the section titled “Set Barcode Data Delimiter” for details of the
“Barcode Data Delimiter Command”.
Print Internal Variable Barcode Data
The following command will use data described by internal variables such as Date, Time
or Counting fields:
<ESC>$b#Y 0x1b 0x24 0x62 <value> 0x59
Since the length of the data at any given moment is unknown by the host, this provides a
means for internal data fields to be processed into barcodes. Refer to section “PJL GPIO
Write Test” for the details on usage of internal data fields and for a “<value>” parameter
to specify in the command.
Default Barcode Parameters
Several of the barcodes provided by the printer are user configurable including line
width, barcode heights and the bar/space ratio. The table above contains the default
values for the user configurable parameters. Note that every effort has been made to