Layout using align commands – IBM SUREMARK TI8 User Manual

Page 212

Advertising
background image

Layout using align commands

A common requirement for receipt layout includes aligning item prices. This is
commonly accomplished using fixed field lengths for item descriptions or counting
characters. Using proportional fonts makes this method of alignment practically
impossible.

The simplest method to align prices is to use the Align Column Right command
(see “Align positions” on page 139) with the Fix Font Matrix command (see “Fix font
matrix” on page 146).

v

Unlike other Align Position commands, the Align Positions-Align Column Right
command can be sent in the middle of a print line. Print characters sent before
the alignment command will be left aligned, while characters sent after the
alignment command will be right aligned.

v

The Fix Font Matrix command forces proportional characters to print using a
single width defined by the command. This essentially negates the proportional
characteristic of the font, while still allowing the user to utilize the custom font.

The following sequence assumes proportional characters have been downloaded
and selected for printing. The following sequence should be used for each item line.
The printer output would resemble the following:

Candy Bar

$

.45

Fountain Soda

$ 1.11

1. Print the item description. For the first item, this is the ASCII data Candy Bar.

2. Issue the Set Alignment command with n=4 (Right Align Column). The

command syntax is X'1B 61 04'.

3. Issue the Fix Font Matrix command with n=dot width of the widest number used.

The command syntax is X'1B 3A xx'.

Note: Finding the optimum value of xx for this command will vary depending on

the proportional character set being used, and may require some
experimentation.

4. Print the item price. For the first item, this is the ASCII data $ .45.

5. Issue the Fix Font Matrix command with n=0, which disables the fixed font

matrix. The command syntax is X'1B 3A 00'.

6. Issue the Print and Line Feed command. Use the command syntax X'0A' or

X'0D'.

Updated April 2, 2009

190

SureMark Printers User’s Guide

Advertising
This manual is related to the following products: