Printer Driver Samples

A generic printer driver sample called Pcl.dll is located in %_WINCEROOT%\Public\Common\Oak\Drivers\Printer. Printers that support the PCL interface can use this driver.

This sample is not a full-featured printer driver. It is provided to assist you in writing printer drivers or porting desktop printer drivers. The sample driver supports color printing.

Applications can use the common Print dialog box to present the user with option to print.

The sample USB printer class driver that provides support for printing over the USB bus is in %_WINCEROOT%\Public\Common\Oak\Drivers\USB\Class\Printer. It follows the USB Device Class Definition for Printing Devices specification. For more information on this specification, see the USB Implementers Forum, Inc. Web site. The sample is written as a stream interface driver for printer ports and exports the stream interface. The sample follows the USB device interface functions.

Test the sample driver using the Windows CE Test Kit (CETK).

The printer driver parses the IEEE-1284 Device identifier string and automatically populates the global printer settings registry. If the mandatory GET_DEVICE_ID command succeeds then the printer driver will show up in the registry under HKEY_LOCAL_MACHINE\Printers\IEEE_1284_Device_String.

Consider the following limitations of the sample printer driver before using it as the basis for other printer drivers:

  • The sample driver assumes that every call to its DrvCopyBits function corresponds to exactly one print band, which is the full width of the page and starts at the left side.
  • Windows CE only supports PCL graphics drivers. Therefore, non-PCL printers can only print text and should pass the ASCII test.
  • The printer driver receives the pixel format that it requests. For example, the ASCII test will print out any files that it can process because the USB printer driver is only a transport and does not alter the data stream.

Note   If you are using an older version of the driver, keep in mind that the driver requested RGB formatted bitmaps, but actually required them to be in blue-green-red format.

See Also

Printer Drivers | Printer Driver Registry Settings

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.