Bewerken

Delen via


Customized Color Formats

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.

Unidrv supports several color formats, which are listed in Handling Color Formats.

For these formats, Unidrv converts GDI bitmaps into the correct format before sending it to the printer. If your printer accepts formats not supported by Unidrv, you must provide a rendering plug-in that implements the IPrintOemUni ImageProcessing method.

If you implement IPrintOemUni ImageProcessing, and if the user selects a color format (ColorMode option) that Unidrv cannot handle, then each time a buffer of GDI bitmap data is ready for printing, Unidrv calls the method and passes the bitmap's address as an input argument. The method must convert the bitmap to the specified format, perform customized halftoning operations if necessary, and call the IPrintOemDriverUni::DrvWriteSpoolBuf method to send the modified bitmap to the print spooler. It must also call the IPrintOemDriverUni::DrvXMoveTo and IPrintOemDriverUni::DrvYMoveTo methods to update the cursor position. For more information about these operations, see the description of IPrintOemUni ImageProcessing.

If a rendering plug-in implements IPrintOemUni ImageProcessing, it can also implement IPrintOemUni::MemoryUsage.