Driver control and device control

Important

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 the Print support app design guide.

If color management control is provided by either the driver or by printer hardware, the driver's printer graphics DLL must set the GCAPS_ICM flag in the DEVINFO structure.

The driver must indicate support for CYMK color space (if appropriate), as described in Supporting CMYK Color Space.

Printer graphics DLLs must define the following three functions:

GDI calls the DrvIcmCreateColorTransform function to supply the driver with ICC profiles for the print job. Given these profiles, the function can create an internal color transform to use when correcting color information. A color transform is a driver-specific, internally defined mapping from one color space to another. The function returns a handle to the transform, which GDI stores.

Flags within the BRUSHOBJ and XLATEOBJ structures indicate whether color management is being performed by the system (or application) or by the driver (or device). Within each driver-implemented graphics DDI drawing function that receives either (or both) of these structures, the flags must be checked. If the system or application is currently handling color management, the driver or device must not. If driver or device color management is enabled, the graphics DDI function must call BRUSHOBJ_hGetColorTransform or XLATEOBJ_hGetColorTransform (or both) to obtain a handle to the color transform to be used. The handle will be one that the driver provided in response to a previous call to its DrvIcmCreateColorTransform function.

Handling proprietary color management

For some devices, proprietary color management is performed (either by the driver or by hardware) regardless of whether ICM has been enabled. Drivers for such devices must not allow color correction to be performed if the received image data has already been corrected. Precorrected data can be received if:

  • An application has color-corrected the image "outside the DC" (see the Microsoft Windows SDK documentation).

  • Color management is being handled by the system.

For either of these scenarios, both the BR_HOST_ICM flag in the flColorType member of BRUSHOBJ and the XO_HOST_ICM flag in the flXlate member of XLATEOBJ will be set. These flags can be set even if the dmICMMethod member of DEVMODEW is DMICMMETHOD_NONE.