Cognitive Solutions A776 All in One Printer User Manual


 
Chapter 5: Programming commands 53
A776-PG00001 C 12/09 A776 (B780) Programming Guide
Or, to set the width of the printing area to two inches at the default horizontal motion unit of 1/203 units per inch,
send the four-byte string:
GS W 150 1
Where 2 inches = 406/203, and 406 = (1 X 256) + 150.
Exceptions
This command is eective only at the beginning of a line. If the setting exceeds the printable area, the maximum value
of the printable area is used. The maximum printable area is 576 dots on the receipt and 420 dots on the slip.












Text characteristics commands
These commands control what the printed information looks like, selection of character sets, denition of custom-
dened characters, and setting of margins. The commands are described in order of their hexadecimal codes.
Select double-wide characters
ASCII DC2
Hexadecimal 12
Decimal 18
Prints double-wide characters. The printer is reset to single-wide mode after a line has been printed or the clear printer
(0x10) command is received. Double-wide characters may be used in the same line with single-wide characters.
Select single-wide characters
ASCII DC3
Hexadecimal 13
Decimal 19
Prints single-wide characters. Single-wide characters may be used in the same line with double-wide characters.
Select 90 degree counter-clockwise rotated print
ASCII ESC DC2
Hexadecimal 1B 12
Decimal 27 18
Rotates characters 90 degrees counter-clockwise. The command remains in eect until the printer is reset or until a
clear printer (0x10), select or cancel upside down print (1B 7B) or cancel rotated print (1B 56) command is received.
Exceptions
This command is valid only at the beginning of a line.
Rotated print and non-rotated print characters cannot be used together in the same line.
Related information
See “Summary of rotated printing” in this document.