Skip to main content

Listen Services

Introduction

A "service", as defined for Print Wizard, is Print Wizard waiting for a print job to appear, running in the background and processing print requests. Print Wizard supports several types of services that can be ran by two different methods.

Types of services

Despool Despool print jobs from a local or network shared directory. This may also include despooling files by wildcard or exact file name.
FtpDespool Despool print jobs from a remote FTP directory (this normally will require a login and password and remote access to the FTP server. Also wildcard or exact file names maybe used.
Listen Listen on a specific network port for a remote application to send a print job (by default this is port 9100 and the protocol is similar to the HP Jetdirect protocol.
LPD Utilize the LPD / LPR protocol common to most Windows and Linux/UNIX systems to receive and manage print jobs.

Methods for running services

Print Wizard Service Print Wizard Services are controlled by the user and or in the user's Startup folder. In this case a user must be logged into the Windows machine for the service to run.
Windows Service for Print Wizard Whenever Windows starts up, so do Windows services. A standard Windows service runs regardless of if a user is logged in and runs under a specific, restricted user called "Local System".

This document is a discussion of the "listen" service, how it works and what to watch out for. If you are interested in services in general, please see the knowledgebase article on Windows Services for Print Wizard.


Setting up a listen service

Through the User Interface program for Print Wizard, you can set up a Service for Print Wizard under the Tools menu. Select Setup services.

You first "add" a service and then you edit its properties to determine the settings and parameters to be used when the service runs.

Services should not have a name with embedded spaces or special characters in order to work correctly under most versions of Windows Services.

Add a service

Add a service by name through the Setup Services menu option under the Tools menu. The name cannot contain any special characters or spaces and must not duplicate any Windows service name already in use.

Edit service properties

Select the "listen" service type. If you plan on running this as a Windows service, you can select the Windows startup type (to have your service start every time Windows does, set this to "automatic" and then use the Windows Service Wizard to install and start your service).

Setting the service for "interaction" will allow the listen service to show various debug and user-interactive dialogs. If not set, the service will always run minimized (this is not applicable for Windows Services).

Next, set the Options and the Printing necessary for your specific service.

Only select a print profile if you are using print profiles to provide additional printer control for specific job types.

 

For Print Wizard to listen correctly, you need specify the network port for Print Wizard to listen on for incoming print jobs. By default, this should be set to 9100.

How it works

A listen service behave much like a network printer in that it watches a network connection for incoming print jobs and then redirects them to a local printer, to fax, email or to a PDF.

You either start the listen service as a Print Wizard Service or as a Windows Service. When you run as a Print Wizard Service, you are running under the current user and with the current user's rights and permissions. But in order to run this way, you have to be logged into the Windows machine, even if the Print Wizard Service is setup to run from your Startup folder.

As a Windows Service, the service can be set to always be running (as long as Windows is up). In this case, you are not logged in, no group and user policies may be in affect and the service is usually run under a limited or restricted user.

We recommend making sure the service works first as a Print Wizard Service. If that works, then test it fully under the Windows Services before going live.

When a Print Wizard listen service is running, it watches for incoming print jobs to come in from remote sources over the port specified. This is similar to how a network printer receives print jobs directly to its IP address on your local network.

Once we see a print job request come in, we hand this off to the Print Wizard engine which captures the data coming in and processes it. In the meantime, the listen service goes back to listening for the next job.

Some Gotcha's and Hints

There are a few items with listening for print jobs to be aware of, both when running as a Print Wizard Service and when running as a Windows Service. The hints below should be reviewed before running your service.

Printers

If no printer name is selected for the service, the Windows default printer will be used. You can select a specific printer for the service or let it default to the user's default printer through the Properties dialog.

If you are planning on running this service as a Windows Service, be sure to select a printer. Letting it "Default" may cause problems as the default printer for the user "Local System" could be different than the default printer for the user you are currently logged in as. Also make sure that the particular printer you select is available to ALL users of this PC so that "Local System" can see this printer.

Windows Services security

When working with Windows Services, it is important to keep in mind whether the listen service is running with the default user (usually "Local System") or if you have assigned it to a specific user. Depending on this setting and the version of Windows you are running on, access to email, faxing, specific directories and even specific printers may be limited and cause problems.

Always test the service first as a Print Wizard Service to make sure it is set up correctly and then re-test it as a Windows Service to make sure you have not overlooked some security issue.

Ports and firewalls

The network port we listen for incoming print jobs on is often blocked by any personal firewall and corporate firewall.

If a print job needs to come through a corporate firewall, check with your network administrator or Internet Service Provider as to how to set this up.

We do not recommend receiving listen print jobs over the Internet. There is no real security check with this type of service and it can open up a port for anyone to use. While we do have some security built into the Print Wizard listen service, it is just not good practice to open this.

If you need to print from over an Internet connection, we recommend to do it over a VPN connection.

Another consideration with the listen service, if you are running the service as a Windows Service you should realize that the user you run as could have different firewall permissions than when you run it as a Print Wizard Service.

User names, group policies, user policies

Of course, the user could try running the Windows Service under the same user name as when you run as a Print Wizard Service. However, even this could fail to work - when a Windows Service runs under a specified user, the running application does not always get the same permissions as the actual user doe, especially if you are running in a corporate domain environment, where both group and user policies are used. If in doubt, always consult your system or network administrator.

Other targets

Email

If your target is to email, you need to think through the process and see if a Windows Service will have access to the correct program and/or protocol. If you are running email through Outlook, the user a Windows Service runs as may not be able to access the Outlook object. If Outlook or Office was installed as a specific user and not as Administrator, Outlook and its email objects, may not be available to the "Local System" user.

If you have firewall policies in place or you are running a local, personal firewall, emails also may be prevented from being accessed. A user policy or user setting may allow Print Wizard to email, but the firewall settings for "Local System" that the service runs as may not have outbound access for the email port.

Fax

Faxing has many of the same issues as printing (such as whether a printer or fax is even available to a Windows Service). Add to this that the Windows Service may also not have permissions to fax even if it sees the fax printer, and things can quickly get more complicated.

Microsoft Small Business Servers set up their fax printer and driver as a true Fax Server. In this case, a Windows Service will most likely NOT have permissions to control or fax directly. In the case of running on an SBS server, you will probably have to always include the UNC name of the shared fax server in your fax setup inside Print Wizard, even if Print Wizard is running locally, and regardless of if you are running as a Windows Service or a Print Wizard Service.

Email, fax, PDF, TIFF and other outputs to file

Emailing data, faxing data, generating a PDF or TIF or printing to a file may all be headaches if you do not know the limitations or the accessibility of the user you are running under. In the case of the default for a Windows Service, the user "Local System" may not have write access to anything but Windows "temp". Know where files are going and what the likelihood of running into permissions means.

Even fax and email generate temporary files and they need to go somewhere accessible to the user that Print Wizard runs as. Fax cover page files or email include files, all have to be accessible to the user.

When emailing or faxing attachments, the same holds true - be sure that the user running Print Wizard has access to all files necessary. However, there is one other consideration here. If you are faxing attachments, not only do you need access to the files you are attaching, but you need access to the fax driver, the applications that render the attachment to a TIFF for faxing and then to the despool area for the fax server or fax printer driver.

What to do next

If you do run into problems, always consider what your access is like and the service method you are running as. Talk it over with your PC and domain administrators, they will most likely know exactly what the problem is.

If all else fails, give us a call.

Copyright © 2024 Rasmussen Software, Inc. Legal Information & Privacy Policy
Send comments and suggestions to rsi@anzio.com