Command String Format

Command strings are used to specify the escape sequences that Unidrv must send to printer hardware. Command strings can be made up of the following elements:

  • Quoted text strings, which have the following format:


    where TextString is a text string.

  • Command arguments, which have the following format:


    where ArgumentType is a letter representing one of the command string argument types, and StandardVariableExpression is a standard variable expression.

Unidrv supports a maximum of 14 quoted text strings and command arguments in a command string.

As an example, a printer's command to set a rectangle's gray fill percentage might be specified as follows:

*Command: CmdRectGrayFill: "<1B>*c" %d{GrayPercentage} "g2P"

To send a percent sign (%) to a printer, include two percent sign characters (%%) in the command string. If the percent sign is at the end of the command string, you must use the hexadecimal equivalent, as in:

"string <25 25>".



Send comments about this topic to Microsoft

© 2014 Microsoft