
Appendix A Programming Guide
A-29
A-5.2.1
Programming
Programming of the resident bar codes is achieved by means of six new control
sequences added to the PCL5 emulation.
The print position and print orientation of a bar code is controlled by standard
PCL5 commands.
$
Bar code print position
Printing of any bar code starts at the current actual cursor position. The
position can be set with any standard PCL5 cursor movement command.
Moving the cursor with printed characters, spaces and carriage return and
line feed is the simplest possibility.
Setting the cursor to an absolute or relative position in PCL units is the best
way to position a bar code:
ESC * p P1 X
absolute horizontal position to P1
ESC * p + P1 X
relative horizontal position P1 to the left
ESC * p - P1 X
relative horizontal position P1 to the right
ESC * p P1 Y
absolute vertical position to P1
ESC * p + P1 Y
relative vertical position P1 down
ESC * p - P1 Y
relative vertical position P1 up
Note:
$
The bar code REFERENCE POSITION is the left upper edge except
for Postnet where the reference position is the character baseline.
$
The cursor position is not changed after printing the bar code.The
cursor must be set to a new position for the next printable character.
$
One PCL unit is the unit of measure for cursor movements. The
default value is 300 units per inch.
$
Bar code print orientation
Bar codes are printable in all four print directions, selectable with the
following PCL5 command:
ESC & a P1 P
P1 = 0, 90, 180, 270 default = 0°