When sending data to a printer as described in KB 138594 http://support.microsoft.com/kb/q138594/ i.e. OpenPrinter with DOC_INFO_1.pDataType set to "RAW", StartDocPrinter, StartPagePrinter, WritePrinter, etc., and the printer port is set to FILE:, print job sits in spooler with status "Error - Printing". No entries are written to the event logs, although print server is configured to log spooler errors and warnings. Tweaking spooler directory security didn't make any difference.
I think it has something to do with the "Print to File" popup not showing up. If I change DOC_INFO_1.pDataType from "RAW" to "TEXT" the popup shows up inside the windows 7 "Interactive Service Detection" - which is also undesirable.
Any ideas how to fix this?