Device Commands

The structures in the printer-data table contain device-command strings. There are three formats that you can use to type command strings in UniTool:

Format Description
ASCII Literal ASCII characters can be typed as part of a command string.
Formatted parameter A formatted parameter is a parameter that is supplied by the Unidriver and sent to the printer in a format based on the specified conversion characters. These conversion characters are always preceded by the % character. The following contains the conversion characters that are supported by the Unidriver, as well as a brief description of each.

Character Description
d Unidriver converts the parameter to a decimal value. (For example, the value 12 is sent as '1' (31h) followed by '2' (32h).)
D Unidriver converts the parameter to a signed decimal value. This is the same as the %d character except it is preceded by a sign.
c Unidriver converts the parameter to a byte value. (For example, the value 12 is sent as FF (0Ch))
l Unidriver converts the parameter to a 16-bit value with the Least Significant Byte (LSB) first. (For example, the value 12 is sent as FF (0Ch) followed by NULL (00h))
m Unidriver converts the parameter to a 16-bit value with the Most Significant Byte (MSB) first. This is the same as %l except the order of the bytes is reversed.
q Unidriver converts the parameter to a unique hexadecimal value formatted for Toshiba and Qume devices.

Hexadecimal Hexadecimal values are preceded by the following two characters: \x. For example, the hexadecimal value 0xFF is typed as \xFF in UniTool.

You type two different kinds of printer commands in UniTool. The first kind enables or disables certain features of the printer. For example, the command string ESCx3 enables letter-quality output of the Kodak Diconix 150 Plus printer. This command (ESCx3) is typed as \x1Bx\x03 in the Text Qualities dialog box. The string ESC was replaced by its ASCII representation (\x1B), the argument x was not altered, and the decimal value 3 was replaced by its hexadecimal equivalent (\x03). The second kind of command contains parameters supplied by the Unidriver at runtime (when the command is used). For example, the Immediate Line Feed command for the Diconix printer is used to advance the cursor in the positive y-direction with respect to the current cursor position. The command string for the Immediate Line Feed command has this syntax:

ESC J n
 

In this example, n is the number of 1/288th inch increments that the cursor will advance.