Improve Printing with Wine
Printing in Windows-NT
Printing works with:
GDI32.DLL together with
various Printer-Drivers,
the Spooler-Client-API (WINSPOOL.DRV),
the Spooler-Service (SPOOLSS.EXE with SPOOLSS.DLL),
a Printprocessor (WinPrint, included in LOCALSPL.DLL),
a Printprovider (LOCALSPL.DLL or WIN32SPL.DLL) and
a (Port-)Monitor (USBMON.DLL or LOCALMON.DLL/LOCALSPL.DLL) with
a (Port-)Monitor User Interface (LOCALUI.DLL)
together with the Printing-Dialogs (comdlg32.dll and compstui.dll)
and the Printer Management User Interface (PRINTUI.DLL)
Printing in Wine
Wine provides printing with:
GDI32.DLL together with
the Client-API (WINSPOOL.DRV),
the buildin Postscript-Driver (WINEPS.DRV) and
on the Unix-Side, (CUPS or LPR (BSD-Based Printing) as Backend.
The "Local Port" Monitor (LOCALSPL.DLL) was started
the "Local Port Monitor User Interface" (LOCALUI.DLL) need a frontend (printui.dll)
What's wrong with Printing in Wine
wineps.drv use some of the old 16-Bit code (A copy of GDI.EXE,WriteSpool16 as Example)
We are fixed to wineps.drv, and we do that in a Wine-Specific way
- What about virtual PDF-Printer?
- We are fixed to Postscript
- There are several Questions from Users: "How to do RAW Printing"
- We are using the Win3.1 Style API for Printer-Drivers
GDI32.DLL must call WINSPOOL.DRV for all Printer-Functions
- We have too many BUGS in Printing
- Some recent Bugs:
List all BUGS for printing
Coverity reports some Defects for winspool.drv
There are some Cross Calls W to A
(They will be fixed during the updates of winspool.drv)
- Every Printing App enumerates the Host Printers while loading winspool.drv
We should do that once in a Wine session in the spooler service SPOOLSS.EXE/SPOOLSS.DLL
What we do not need / will not support
- Different Printprovider (Remote-Printing)
- CUPS and LPR can forward our Data
- The Windows Spooler-Service
- CUPS and LPR are fine as Spooler
RPC between WINSPOOL.DRV and SPOOLSS.EXE/SPOOLSS.DLL
A PIPE between an Application and SPOOLSS.EXE/SPOOLSS.DLL
What about Windows Printer-Drivers in wine
- This would be nice, but we have still many unimplemented Functions
- Some years ago, 16-Bit Drivers (Windows 3.1) are reported to work
There is a CUPS-Backend named ddiwrapper in SUSE, that use a modified wine
- (gdi32.dll and winspool.drv are replaced) to print with recent Native Printer-Drivers (Cannon-Printers are reported to work)
- Wine is using a different API to communicate with the Wine Printer Driver
Work in Progress
- winspool.drv
AddMonitor is implemented (19. Jun. 2006)
AddPort is implemented (16. Jan 2007)
AddPortEx is implemented (05. Jun 2007)
AddPrinterDriver is implemented (24. Aug. 2007)
AddPrinterDriverEx is implemented (23. Aug. 2007)
ConfigurePort is implemented (12. Jan 2007)
DeletePort is implemented (16. Jan 2007)
DevicePropertySheets is not implemented Patch for a stub send (9. Jun. 2006)
DocumentPropertySheets is not implemented Patch for a stub send (9. Jun. 2006)
EnumForms is a stub Patch for the Testsuite accepted
EnumMonitors is implemented (31. Mar. 2006)
EnumPorts is implemented (06. Nov. 2006)
EnumPrintProcessors is implemented (15. Oct. 2009)
FindClosePrinterChangeNotification is not implemented
FindFirstPrinterChangeNotification is not implemented
FindNextPrinterChangeNotification is not implemented
GetPrintProcessorDirectory is implemented (10. Jun. 2006)
OpenPrinter is implemented
Does not use the Monitor for the Port
ReadPrinter is not implemented
SetDefaultPrinter is not implemented Need to sync the old Patch to Implement the Function
WritePrinter is not implemented
XcvDataW is implemented (06. Jan 2007)
- localspl.dll
InitializePrintMonitor is implemented (20. Oct. 2006) - pfnAddPort is obsolete: Use pfnAddPortUI from localui.dll
pfnAddPortEx is implemented (14. Jun 2007)
pfnClosePort is implemented (11. Sep 2007) - pfnConfigurePort is obsolete: Use pfnConfigurePortUI from localui.dll
- pfnDeletePort is obsolete: Use pfnDeletePortUI from localui.dll
pfnEndDocPort is not implemented
pfnEnumPorts is implemented (31. Oct 2006)
pfnGetPrinterDataFromPort is not implemented
pfnOpenPort is implemented (11. Sep 2007) - pfnOpenPortEx is only for a Language Monitor
pfnReadPort is not implemented
pfnSetPortTimeOuts is not implemented
pfnStartDocPort is not implemented
pfnWritePort is not implemented
pfnXcvOpenPort is implemented (17. Jan 2007)
pfnXcvDataPort is nearly complete implemented (17. Jan 2007)
cmd: AddPort (18. Apr 2007)
cmd: ConfigureLPTPortCommandOK (20. Feb 2007)
cmd: DeletePort (07. Mar 2007)
cmd: GetDefaultCommConfig (20. Feb 2007)
cmd: GetTransmissionRetryTimeout (20. Feb 2007)
cmd: MonitorUI (17. Jan 2007)
cmd: PortIsValid (17. Jan 2007)
cmd: PortExists
cmd: SetDefaultCommConfig (20. Feb 2007)
pfnXcvClosePort is implemented (17. Jan 2007)
- localui.dll
InitializePrintMonitorUI is implemented (09. Apr 2007)
pfnAddPortUI is implemented (01. Mai 2007)
pfnConfigurePortUI is implemented (05. Mai 2007)
pfnDeletePort is implemented (18. Apr 2007)
- printui.dll
- The Printer-Queue Window, Printer-Management from the Commandline and much more.
See printui in this wiki
- The Printer-Queue Window, Printer-Management from the Commandline and much more.
- compstui.dll
- This DLL is required since NT 4.0 to provide the standard Property-Sheets for "Printer-Properties" / "Document Settings"
CommonPropertySheetUI is a stub
All Bitmap-Resources are absent
All String-Resources are absent
Issues in other DLL's, that affect Printing
- comdlg32.dll
We have not enough tests
PrintDlgEx is a stub - This is the new Printer-Selector for Applications since w2k
Bug #4342: PrintDlgEx* unimplemented
The standard Property-Sheets are implemented in compstui.dll
- kernel32.dll
IniFileMapping is not implemented Bug #4096: IniFileMapping not Implemented
- shell32.dll
The Printer-Folder is not implemented Old Patch to implement the Printer-Folder
Dialog "Printer-Properties" is not implemented
Dialog "Document-Properties" is not implemented
Dialog "Job-Properties" is not implemented
Nice to have
- wineps.drv
Creating Property-Sheets from PPD-Informations would be nice (Forms, Quality)
A Property-Sheet to select a specific PPD-File would be nice
- winecfg.exe
Nice would be a Printing-Page to redirect a Port to a Unix-File or Pipe it to a Unix-App
See Also
PDF in this Wiki
printui in this Wiki: Printer-Management on the commandline
[RedMon] in this Wiki
RedMon 1.7 in the AppDB
Workers: DetlefRiekenberg

MoinMoin
Python