Partager via


Printer Driver Samples (Windows Embedded CE 6.0)

1/6/2010

Two printer driver samples are available to you: A generic printer driver, called Pcl.dll, and a USB printer driver.

Pcl.dll is located in %_WINCEROOT%\Public\Common\Oak\Drivers\Printer. Printers that support the PCL interface can use this driver. Although this sample driver supports color printing, it does not have a full set of functionality. It is provided to assist you in writing printer drivers or porting desktop printer drivers. When using Pcl.dll, applications can use the common Print dialog box to present the user with an option to print.

The sample USB printer driver provides support for printing over a USB bus. It is written as a stream interface driver for printer ports, and follows the USB device interface functions. It is located in %_WINCEROOT%\Public\Common\Oak\Drivers\USB\Class\Printer. This sample driver follows the USB Device Class Definition for Printing Devices specification.

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 appears in the registry under HKEY_LOCAL_MACHINE\Printers\IEEE_1284_Device_String.

Before using the sample printer driver as the basis for other printer drivers, consider these factors:

  • Every call to the DrvCopyBits function in the printer driver corresponds to exactly one print band, which is the full width of the page and starts at the left side.
  • Because Windows Embedded CE only supports PCL graphics drivers, 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 prints out any files that it can process because the USB printer driver is only a transport and does not alter the data stream.

See Also

Other Resources

Printer Drivers