Bewerken

Delen via


Command String Format

Important

The modern print platform is Windows' preferred means of communicating with printers. We recommend that you use Microsoft's IPP inbox class driver, along with Print Support Apps (PSA), to customize the print experience in Windows 10 and 11 for printer device development.

For more information, see Modern print platform and the Print support app design guide.

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:

    "TextString"

  • Command arguments, which have the following format:

    %ArgumentType{StandardVariableExpression}

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>".