V4 print drivers attempting to send PCL/Postscript data in RAW mode to a printer produces a 0 byte spool file.
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.
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:
- Call GetPrinterDriver to retrieve the DRIVER_INFO_8 struct.
- Check DRIVER_INFO_8::dwPrinterDriverAttributes for the PRINTER_DRIVER_XPS flag.
- Choose your datatype based on the presence or absence of the flag:
- If the flag is set, use ‘XPS_PASS’
- If the flag is not set, use ‘RAW’
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