Difference between revisions of "Printing"

From ReactOS Wiki
Jump to: navigation, search
(Revamped the page and added everything I know about the current status and best next steps - help is welcome!)
Line 1: Line 1:
{{outdated}}
+
ReactOS Trunk has first Printing Support since the "colins-printing-for-freedom" branch has been merged in r73039 on October 26, 2016.
  
[[ReactOS Print Spooler Service (Spoolsv)]]
+
This page shall track all involved components, their current status and the next steps that need to be done. Many components still need research, so your help is welcome!
  
I am beginning work on implementing printing support in ReactOS. If you have any ideas or want to help with [[printer]]s, it would be very much appreciated. Please leave your name and some way of getting hold of you.
+
== Contacts ==
 +
* [[Colin Finck]]
  
There are a number of components to have code written for them in order to maintain compatibility with the existing Windows 2000/Windows XP architecture. For this reason, the implementation I am currently planning will follow that of the latter systems. Unfortunately we can use precious little from [[WINE]].
+
== Current Status and Roadmap ==
 
+
{| class="wikitable"
Some things we need:
+
! colspan="2"| Base Components
* Print spooler components (driver winspool.drv – stubbed but out of date in WINE/ReactOS, service spoolsv.exe – I started writing one, router spoolss.dll)
+
|-
* Print processor (WinPrint.dll 'integrated into localspl.dll from Windows 2000 onwards')
+
| winspool.drv ||
* Local print provider (localspl.dll) There is an skeletal example of a print provider in the ddk called pp, also an example in ceps.
+
'''Provides all Printer APIs to the application world'''<br>
* Port monitors (Localmon sample in DDK; integrated into localspl.dll from Windows 2000 onwards)
+
[[File:Symbol support vote.png]] Implements OpenPrinter, StartDocPrinter, StartPagePrinter, WritePrinter, EndPagePrinter, EndDocPrinter, ClosePrinter to send RAW data to the printer<br>
* Language monitor (see PJLMon sample in DDK)
+
[[File:Symbol support vote.png]] Implements EnumPrinters for enumerating printers<br>
* PrintUI.dll (possibly at some point)
+
[[File:Symbol support vote.png]] Implements AddJob, GetJob, EnumJobs for handling print jobs of a printer<br>
* compstui.dll (property sheet pages etc)
+
[[File:Symbol support vote.png]] Implements EnumPorts for enumerating the available printer ports<br>
* add necessary win32k, gdi functions for print drivers (EngWritePrinter, etc.)
+
[[File:Symbol support vote.png]] Implements EnumMonitors for enumerating the available port monitors<br>
 
+
[[File:Symbol support vote.png]] Implements EnumPrintProcessorDatatypes for enumerating the datatypes of a Print Processor associated to a Printer<br>
My initial plan is that winspool will directly call localspl.dll (the local spooler) as RPC still seems to be in it is infancy in ReactOS. However, I see that there is code in svn for RPC though I haven't had chance to play yet.
+
[[File:Symbol oppose vote.png]] Needs support for getting and setting the default printer (GetDefaultPrinter/SetDefaultPrinter)<br>
 
+
[[File:Symbol oppose vote.png]] Needs fully working GetPrinter/SetPrinter implementation for altering a printer's parameters<br>
One bonus is that the Windows 2000/Windows XP print system is very modular making testing a lot easier.
+
[[File:Symbol oppose vote.png]] Needs support for adding and deleting Printer Drivers (AddPrinterDriver(Ex), DeletePrinterDriver(Ex))<br>
 
+
[[File:Symbol oppose vote.png]] Needs support for handling forms (aka paper sizes, AddForm, DeleteForm, EnumForms)<br>
Once I can use my laser printer I can write my Master's project in LaTeX on ReactOS and print it as well. Eventually I'd love to have something like [http://www.fineprint.com/ FinePrint] built into ReactOS
+
[[File:Symbol oppose vote.png]] Needs support for managing ports (AddPort(Ex), DeletePort, SetPort)<br>
 
+
[[File:Symbol oppose vote.png]] Needs support for adding and deleting connections to shared printers (AddPrinterConnection, DeletePrinterConnection)<br>
== Current status ==
+
[[File:Symbol oppose vote.png]] Needs support for Printer Change Notifications<br>
* 10/08/05 – My main focus is on writing local print provider. It behaves as expected in Windows XP Professional so far so good.
+
[[File:Symbol oppose vote.png]] Needs all A functions implemented as counterparts to the W functions<br>
* 14/09/05 – whoah a month's gone by and localspl is all stubbed out and I've got around 1/3 of a print provider
+
|-
* 13/07/06 – I am currently focusing on the print spooler service, spoolsrv
+
| spoolsv.exe ||
* 09/02/07 – I have started a PhD and it is currently taking a lot of time, so have halted work on the print subsystem
+
'''Central service that receives all printing requests from local and remote machines'''<br>
* 04/05/15 - Colin created a branch "colins-printing-for-freedom"
+
[[File:Symbol support vote.png]] Listens on a local RPC link and forwards calls to spoolss.dll. Evolves together with the other components.<br>
 +
[[File:Symbol oppose vote.png]] Needs to listen for remote RPC calls on the network too and handle them appropriately.
 +
|-
 +
| spoolss.dll ||
 +
'''Component used by spoolsv.exe to determine the Print Provider(s) that shall handle a call'''<br>
 +
[[File:Symbol support vote.png]] Forwards calls to one or multiple Print Providers. Evolves together with the other components.<br>
 +
[[File:Symbol oppose vote.png]] Research into the Marshall* exports could be valuable. Their name sounds like they could simplify the manual marshalling I currently do in spoolsv.
 +
|-
 +
! colspan="2"| Print Providers
 +
|-
 +
| localspl.dll ||
 +
'''Manages all local printers and their queues. Most of the fun happens here!'''<br>
 +
This component evolves together with the other components and the ToDo list is mostly the same as for winspool.drv.
 +
|-
 +
| win32spl.dll ||
 +
'''Calls a remote Spool Server to forward the calls to (Windows Printer Sharing)'''<br>
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented
 +
|-
 +
| inetpp.dll ||
 +
'''Handles TCP/IP Network Printers'''<br>
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented
 +
|-
 +
! colspan="2"| Print Monitors
 +
|-
 +
| localmon.dll ||
 +
'''Manages the legacy local ports and the virtual FILE port'''<br>
 +
Available WDK Samples: localmon<br>
 +
[[File:Symbol support vote.png]] Fully implements support for COM, LPT and FILE ports<br>
 +
[[File:Symbol oppose vote.png]] Original Windows Local Port Monitor also implements support for IrDA Printers, but I don't think this has any priority
 +
|-
 +
| pjlmon.dll ||
 +
'''Language Monitor for interpreting and acting according to the HP PJL (Printer Job Language)'''
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented, not sure if still needed
 +
|-
 +
| tcpmon.dll ||
 +
'''Manages IP-based ports for TCP/IP network printers'''<br>
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented
 +
|-
 +
| usbmon.dll ||
 +
'''Manages virtual USB001, USB002, etc. ports for USB printers'''<br>
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented
 +
|-
 +
! colspan="2"| Print Processors
 +
|-
 +
| winprint.dll ||
 +
'''Alters the print job data to perform a datatype conversion to RAW or apply job-specific settings'''<br>
 +
Available WDK Samples: GenPrint<br>
 +
[[File:Symbol support vote.png]] Supports the RAW datatype and forwards data without any modification.<br>
 +
[[File:Symbol oppose vote.png]] Needs to support TEXT and multiple versions of EMF.
 +
[[File:Symbol oppose vote.png]] Needs to support Multiple Copies, Collation, Reverse Printing, Duplex Printing, and N-up Printing.
 +
|-
 +
! colspan="2"| GDI DDI Printer Drivers
 +
|-
 +
| unidrv.dll ||
 +
'''Implements the User-Mode v3 Printer Driver Model, used by every such driver to assist converting GDI calls to the printer language'''<br>
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented
 +
|-
 +
| unidrvui.dll ||
 +
'''Additional UI components for unidrv.dll'''<br>
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented
 +
|-
 +
| tty.dll ||
 +
'''Implements the Generic / Text-Only Printer Driver'''<br>
 +
Available WDK Samples: tty, msplot<br>
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented
 +
|-
 +
! colspan="2"| WDM Printer Drivers
 +
|-
 +
| usbprint.sys ||
 +
'''Implements the generic USB Printer Class for sending data to all USB-connected Printers'''<br>
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented
 +
|-
 +
! colspan="2"| Setup
 +
|-
 +
| ntprint.dll<br>ntprint.exe ||
 +
'''This is apparently used when installing new printers.'''<br>
 +
[[File:Symbol oppose vote.png]] Entirely unimplemented
 +
|-
 +
! colspan="2"| UI Components
 +
|-
 +
| compstui.dll ||
 +
I still have to figure out how important these components are. They obviously contain UI elements :)
 +
|-
 +
| printui.dll<br>printui.exe ||
 +
I still have to figure out how important these components are. They obviously contain UI elements :)
 +
|-
 +
! colspan="2"| GDI / Win32k Parts
 +
|-
 +
| ? ||
 +
GDI-based Printing functions like StartDoc and Printer DCs need to be supported. This still needs general investigation, which components are involved and what functions need to be implemented.
 +
|}
  
 
== Resources ==
 
== Resources ==
Line 43: Line 134:
 
* [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/graphics/hh/graphics/drvarch_b2c30d51-4fe1-4c8e-9fa2-b1a80bba3597.xml.asp Printer graphics dll]
 
* [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/graphics/hh/graphics/drvarch_b2c30d51-4fe1-4c8e-9fa2-b1a80bba3597.xml.asp Printer graphics dll]
 
* [http://www.lprng.com/ LPRng, Berkeley based LPR print spooler]
 
* [http://www.lprng.com/ LPRng, Berkeley based LPR print spooler]
* [http://code.reactos.org/changelog/~br=colins-printing-for-freedom/reactos Colin's printing for freedom]
 
 
* [https://www.reactos.org/blogs/reactos-printing-first-time ReactOS printing for the first time! 2015/07/25 by Colin Finck]
 
* [https://www.reactos.org/blogs/reactos-printing-first-time ReactOS printing for the first time! 2015/07/25 by Colin Finck]
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:ReactOS Components]]
 
[[Category:ReactOS Components]]

Revision as of 22:04, 4 May 2017

ReactOS Trunk has first Printing Support since the "colins-printing-for-freedom" branch has been merged in r73039 on October 26, 2016.

This page shall track all involved components, their current status and the next steps that need to be done. Many components still need research, so your help is welcome!

Contacts

Current Status and Roadmap

Base Components
winspool.drv

Provides all Printer APIs to the application world
Symbol support vote.png Implements OpenPrinter, StartDocPrinter, StartPagePrinter, WritePrinter, EndPagePrinter, EndDocPrinter, ClosePrinter to send RAW data to the printer
Symbol support vote.png Implements EnumPrinters for enumerating printers
Symbol support vote.png Implements AddJob, GetJob, EnumJobs for handling print jobs of a printer
Symbol support vote.png Implements EnumPorts for enumerating the available printer ports
Symbol support vote.png Implements EnumMonitors for enumerating the available port monitors
Symbol support vote.png Implements EnumPrintProcessorDatatypes for enumerating the datatypes of a Print Processor associated to a Printer
Symbol oppose vote.png Needs support for getting and setting the default printer (GetDefaultPrinter/SetDefaultPrinter)
Symbol oppose vote.png Needs fully working GetPrinter/SetPrinter implementation for altering a printer's parameters
Symbol oppose vote.png Needs support for adding and deleting Printer Drivers (AddPrinterDriver(Ex), DeletePrinterDriver(Ex))
Symbol oppose vote.png Needs support for handling forms (aka paper sizes, AddForm, DeleteForm, EnumForms)
Symbol oppose vote.png Needs support for managing ports (AddPort(Ex), DeletePort, SetPort)
Symbol oppose vote.png Needs support for adding and deleting connections to shared printers (AddPrinterConnection, DeletePrinterConnection)
Symbol oppose vote.png Needs support for Printer Change Notifications
Symbol oppose vote.png Needs all A functions implemented as counterparts to the W functions

spoolsv.exe

Central service that receives all printing requests from local and remote machines
Symbol support vote.png Listens on a local RPC link and forwards calls to spoolss.dll. Evolves together with the other components.
Symbol oppose vote.png Needs to listen for remote RPC calls on the network too and handle them appropriately.

spoolss.dll

Component used by spoolsv.exe to determine the Print Provider(s) that shall handle a call
Symbol support vote.png Forwards calls to one or multiple Print Providers. Evolves together with the other components.
Symbol oppose vote.png Research into the Marshall* exports could be valuable. Their name sounds like they could simplify the manual marshalling I currently do in spoolsv.

Print Providers
localspl.dll

Manages all local printers and their queues. Most of the fun happens here!
This component evolves together with the other components and the ToDo list is mostly the same as for winspool.drv.

win32spl.dll

Calls a remote Spool Server to forward the calls to (Windows Printer Sharing)
Symbol oppose vote.png Entirely unimplemented

inetpp.dll

Handles TCP/IP Network Printers
Symbol oppose vote.png Entirely unimplemented

Print Monitors
localmon.dll

Manages the legacy local ports and the virtual FILE port
Available WDK Samples: localmon
Symbol support vote.png Fully implements support for COM, LPT and FILE ports
Symbol oppose vote.png Original Windows Local Port Monitor also implements support for IrDA Printers, but I don't think this has any priority

pjlmon.dll

Language Monitor for interpreting and acting according to the HP PJL (Printer Job Language) Symbol oppose vote.png Entirely unimplemented, not sure if still needed

tcpmon.dll

Manages IP-based ports for TCP/IP network printers
Symbol oppose vote.png Entirely unimplemented

usbmon.dll

Manages virtual USB001, USB002, etc. ports for USB printers
Symbol oppose vote.png Entirely unimplemented

Print Processors
winprint.dll

Alters the print job data to perform a datatype conversion to RAW or apply job-specific settings
Available WDK Samples: GenPrint
Symbol support vote.png Supports the RAW datatype and forwards data without any modification.
Symbol oppose vote.png Needs to support TEXT and multiple versions of EMF. Symbol oppose vote.png Needs to support Multiple Copies, Collation, Reverse Printing, Duplex Printing, and N-up Printing.

GDI DDI Printer Drivers
unidrv.dll

Implements the User-Mode v3 Printer Driver Model, used by every such driver to assist converting GDI calls to the printer language
Symbol oppose vote.png Entirely unimplemented

unidrvui.dll

Additional UI components for unidrv.dll
Symbol oppose vote.png Entirely unimplemented

tty.dll

Implements the Generic / Text-Only Printer Driver
Available WDK Samples: tty, msplot
Symbol oppose vote.png Entirely unimplemented

WDM Printer Drivers
usbprint.sys

Implements the generic USB Printer Class for sending data to all USB-connected Printers
Symbol oppose vote.png Entirely unimplemented

Setup
ntprint.dll
ntprint.exe

This is apparently used when installing new printers.
Symbol oppose vote.png Entirely unimplemented

UI Components
compstui.dll

I still have to figure out how important these components are. They obviously contain UI elements :)

printui.dll
printui.exe

I still have to figure out how important these components are. They obviously contain UI elements :)

GDI / Win32k Parts
?

GDI-based Printing functions like StartDoc and Printer DCs need to be supported. This still needs general investigation, which components are involved and what functions need to be implemented.

Resources