v4 Print Drivers using RAW mode to send PCL/Postscript directly to the printer generates 0 byte spool file.

Applies to: Windows 8Windows 8 EnterpriseWindows 8 Pro

Symptoms


V4 print drivers attempting to send PCL/Postscript data in RAW mode to a printer produces a 0 byte spool file.

Cause


V4 drivers are all XPS-based drivers.  As such, the use of the datatype ‘RAW’ cannot be used, similar to the behavior of a v3 XPSdrv driver on Vista or Windows 7.

Resolution


Use XPS_PASS in place of RAW to pass information directly to the print filter pipeline in v4 and v3 XPSDRv drivers.  On Windows 8, this can be determined by using the following steps:

  1. Call GetPrinterDriver to retrieve the DRIVER_INFO_8 struct.
  2. Check DRIVER_INFO_8::dwPrinterDriverAttributes for the PRINTER_DRIVER_XPS flag.
  3. Choose your datatype based on the presence or absence of the flag:
    1. If the flag is set, use ‘XPS_PASS’
    2. If the flag is not set, use ‘RAW’

 

More Information



The XPS_PASS datatype was introduced in Windows Vista in order to pass XPS directly to the print filter pipeline for a v3 XPSDrv driver. This was used in order to avoid overloading the RAW datatype for v3 drivers. Since v4 drivers are all XPS-based drivers, XPS_PASS has effectively replaced the use of RAW for these drivers.


How To: Send Data Directly to an XPS Printer
GetPrinterDriver Function
DRIVER_INFO_8 Structure