Printer Commands
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.
The GPD language provides a predefined command name for each commonly used printer operation. Additionally, customized commands can be defined for device-specific printer options.
Each printer command can be implemented in either of two ways:
You can place a device-specific command string in a GPD file. Unidrv sends the command string to the print spooler at the appropriate time.
You can implement the IPrintOemUni::CommandCallback COM method, which dynamically generates a command string. Unidrv calls the method whenever it has to send the command to the spooler. For more information see Dynamically Generated Printer Commands in Customizing Microsoft's Printer Drivers.
The following topics describe how to specify printer commands in GPD files: