Hello, having an issue with a V4 printer driver, and not finding what I need in the Microsoft docs. Hoping someone here can shed some light on this.
I'm using VS2019 (16.11.12) with WDK 10 (10.0.19041). My task is to create a 64-bit V4 PostScript printer driver. I started with the "Printer Driver V4" project template (configured as Debug x64). I made the necessary updates to the default PPD, and INF, and driver properties, and built my driver. Build was fine. I installed it. I printed the Windows Test Page and ran it through my PostScript interpreter. All seems normal. My PPD feature additions (*OpenUI) show up under "Printer Features" in the driver UI tree view as expected. In other words, it all appears good.
I then tried printing a test image from Illustrator CS5. The test image is one I created; it's a CMYK image. What I discovered, when I attempted to print it, was that Illustrator would not allow me to select "Let PostScript printer determine colors" and would only allow me to select an RGB ICC profile for the Printer Profile. In other words, Illustrator sees the driver as only supporting RGB, which is odd because my PPD includes the line "*DefaultColorSpace: CMYK"
So, I went back to my project and, on a whim, changed the "ClassVer=" line in the INF from 4.0 to 3.0. I rebuilt the driver, uninstalled the previous one, reinstalled the new build, and tested it again. This time, Illustrator allowed me to select "printer determines color" and allowed me to select a CMYK printer profile. Illustrator sees the V3 driver as CMYK, but the V4 driver as RGB. Other than that, the UI, the list of PostScript features, all appear the same.
The only thing I changed in my project was the driver version in the INF, from 4 to 3. I tried it again, switching back to "ClassVer=4.0" and, as before Illustrator saw the driver as an RGB device. Switched to "ClassVer=3.0" and Illustrator saw it as CMYK. What the heck?
In both cases, my PPD includes the line "*MSIsXPSDriver: True" and, as I said, "*DefaultColorSpace: CMYK" and, in my PipelineConfig file is the filter reference to MSxpsPS.dll (and nothing else).
So my question is two-fold: first, why is V4 defaulting to an RGB workflow? That makes no sense to me. XPS supports RGB and CMYK (as well as N-color and spot colors). PostScript as well. My understanding is that MSxpsPS.dll simply translates between XPS and PostScript, so why ignore the DefaultColorSpace line in the PPD and default to RGB? And, more important, how do I change this default behavior?
Clearly, my PPD is being parsed because my other *OpenUI settings are showing up in the driver UI. But *DefaultColorSpace is not affecting the behavior of MSxpsPS. Is there some other way to configure MSxpsPS, if not in the PPD? Or, are there other MSxpsPS-specific keywords for the PPD (such as *MSIsXPSDriver and *MSXPSMaxCopies)?
As an aside, there is also something else I noticed. The V4 Windows test page was 122K in size, whereas the V3 Windows test page was 4,486K (I'm talking about the test print you print at the end of the Windows driver install wizard). I tested both in Acrobat Distiller, and both produced nearly identical results. The V4 file claims to have been made by MSxpsPS, whereas the V3 file claims to have been made by PScript5 ver. 5.2.2. But, I'm unsure how to account for the significant size difference. Downloaded fonts, maybe?
Anyway, this forced RGB workflow issue appears to be specific to MSxpsPS.dll, and clearly something I'm doing wrong or missing in terms of configuring the behavior of MSxpsPS. So my question is, how do I alter this default behavior? And, are there other MSxpsPS behaviors that can be controlled?
What I have tried:
I've read through Microsoft's V4 printer driver-related documentation for WDK 10, and I've gone through all the sample code on GitHub related to printer drivers, specifically the sample V4 code and anything (V3 and V4) related to PostScript drivers. The entire project consists of the INF, the PPD, the manifest, and the PipelineConfig. There are no build warnings or messages coming up, so I can only assume I'm missing something in configuring the behavior of MSxpsPS. Any suggestions would be most appreciated. Thanks!