The Print Wizard LPD protocol
A standard for UNIX/Linux/AIX remote printing is supported through a number of protocols often grouped together as the Remote Print protocol, often referred to as Remote LP, LPR or LPR/LPD (LPD being the server portion and LPR the client portion). Along with this there are several extended versions of the protocol and most other print protocols also support LPR/LPD, such as LPRng, CUPS, etc.
These protocols are designed to watch for print jobs at the server end that are issued at the client end. In our case, the PC with Print Wizard LPD running becomes the server end (listening for a job) while the host end becomes the client (sending a job when it is ready). Confused yet?
Along with issuing regular print jobs to process, the protocol also lends itself to some basic print management options, such as requesting printer status, job status and killing pending print jobs.
Print Wizard LPD protocol can be initiated one of two ways, either as a Windows service or as a Print Wizard service. When the Print Wizard LPD protocol is running it listens on a specific port (the default is port 515) and waits for requests from a client.
A Windows service starts whenever Windows starts and does not require a user to be logged in. A Print Wizard service can be started manually or to start when a user logs in. This method DOES require a user to be logged in before it will run.
Print Wizard Service for Print Wizard's LPD protocol
Unlike PwDespool and PwListen, PwLpd cannot be run from command line parameters only as it needs to have defined certain information for the LPD protocol to work properly. In particular, it must have defined a “print queue” in order for the program to process requests from an LPR client.
There are two steps to setting up a Print Wizard LPD service:
- First you need to define the service through the user interface for Print WIzard (PwUi).
- Second, start the LPD service. You can either manually start PwLpd with a specific service name,
Pwlpd.exe /service=
or set it up to run from the Windows Startup folder when the user logs in (drop a shortcut into the Startup folder with the same line as above or select the menu item to do this through the user interface).
PwLPD starts minimized by default. It does have an active messages screen that display information as jobs are processed.
Windows Services for Print Wizard's LPD protocol
Similar to PwLPD and Print Wizard Services, you initially have three steps to do in order to start the LPD Windows service:
- First you need to define the service through the user interface for Print WIzard (PwUi).
- Second is to register the service with Windows Service Manager. To do this, you can use the user interface (see the Tools menu item) or you can manually run the install
pwservices.exe/install
Likewise you can uninstall the service using the command line switch
pwservices.exe/uninstall
- Third, start the LPD Windows service. You can do this through a) the user interface appropriate menu items (see the Tools menu), b) through the Windows services management control panel or c) using the command line utility "sc"
sc /start
Likewise, you can stop the service if it is running by doing
sc /stop
How it works
Print Wizard's LPD on Windows works much like any LPD would on a Linux/UNIX system. At the client end you specify a printer name (which is the queue name) you want to print to on the server end. On the server end, Print Wizard's LPD running on the PC, you set up a queue that relates to a printer or a job to perform on the file received.
Each job coming in to a specific port includes the queue name to print to, information about the job and the owner of the job. So any number of remote LPR or LP clients can print to the same printer (or print queue) on the server end, and have that output redirected to the correct printer.
The advantage of Print Wizard's LPD is that in doing the redirect work, we can run the whole print job through Print Wizard and force different actions to take place on that job, completely automatic with no user intervention. Here are some examples:
- You can have one print queue print to Printer-A, another to Printer-B.
- You can have a print queue that automatically applies an invoice form overlay, another a receipt overlay and another simply direct to the printer.
- Queue A might be a fax queue, using the PCs faxing capabilities, while Queue B might email the incoming job.
- Queue C might translate PCL to local printer code making the job totally printer independent, while Queue D might generate a PDF of the print job.
- You could even set up a queue that would pass the print job off to your own script that might run it through a PostScript translator, such as Ghostscript, prior to printing it.
The options are endless and we do have customers running with as many as 100 queues set up on a single PC.
What to watch for
There are several items that you should be aware of when working with the LPD protocol:
- Many client systems consider queue names as case sensitive.
- Many clients can do a query for status - in order to accomplish this, we do query the printer and the print spooler. If the printer is offline or unavailable, or the printer is a network printer, this process may be slow.
- Many clients can issue commands to kill a print job by job ID. If you query first, you can get this print job ID. However, you also need permissions to do this. Print Wizard's PwLPD service may or may not know the print job owner, depending on the information we received from the host. If the user making the request is "root", we assume they have permissions to kill the job. Otherwise, the user making the request must match the owner of the print job.
- PwLPD allows you to set a default queue name to use. You can set up a default queue that will catch all print jobs coming to a specific PC without a matching queue name. With this set, you can redirect all non-specified jobs to a certain printer. If this is not set, and there is no specified queue for a print job, the print job is simply thrown away.
- Related to print queue setup, you can have a queue point to a print profile. First set up the print profile in the Print Wizard User Interface and then print the specific queue to that profile. When a job is received for that queue, the print profile will be used. In this manner you can set a profile that faxes, emails, generates PDFs or runs your own custom script (which in turn could run Print Wizard again).
- Queue Rules allow you to prevent certain IP ranges, host names, or even certain types of files from printing. If you set a print queue as the default queue, anyone from anywhere maybe able to print on the related printer. So you may want to also set up rules to prevent mischievous users.
Check out the Print Wizard manual for more information on any of these options.
- Print Wizard
- How Print Wizard receives jobs
Related Topics
- Windows Services for Print Wizard