home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR16
/
WLPRSP30.ZIP
/
WLPRSPL.ASC
< prev
next >
Wrap
Text File
|
1993-09-24
|
24KB
|
605 lines
WLPRSPL V3.0
An LPR based printer spooler for Windows 3.1
September 24, 1993
Thomas Heil
Hindenburgstr. 50
41352 Korschenbroich
Germany
E-Mail: th.heil@kfa-juelich.de
This document was created with Microsoft Word for Windows
2.0
DISCLAIMER:
THE SOFTWARE IS PROVIDED AS-IS. THE AUTHOR DISCLAIMS ALL
WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. NO LIABILITY IS ASSUMED FOR
DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE
USE OF THIS SOFTWARE.
All trademarks appearing in this document are the property
of their respective owners.
Table of Contents
Table of Contents 3
Introduction 5
Requirements: 5
Contents 5
How does the spooler work? 7
Installation 8
First Start 8
Defining Local Queues 8
Adjusting WLPRSPL Parameters 9
WLPRSPL Running ... 10
WLPRSPL Menu Options 11
Usage Notes 12
Licensing and Registration 14
Registration Fee 14
Change Log 14
One final word ... 15
Registration Form 17
Introduction
WLPRSPL is a program which allows transparent printing from
Microsoft Windows 3.1 applications to printers which are
reachable over a TCP/IP network using the LPD Protocol
(RFC1179). The user installs the correct printer drivers
that match the printers he wants to use, and connects them
to a local spool file in the same way he would connect a
driver to an LPTx port. When an application then prints to
such a printer the Windows Print Manager writes the printer
data to the corresponding spool file and sends WLPRSPL a
special notification (a WM_SPOOLERSTATUS message). The
spool file is then renamed by WLPRSPL, entered into its own
queueing system, and then later sent to the remote printer.
If the print job could be sent successfully the spool file
is deleted, otherwise sending is retried. After a user-
definable number of unsuccessful retries the user is
notified and the local queue is disabled. The user may then
enable this queue later when all problems are eliminated,
and all files queued up to this time will be sent.
Requirements:
Microsoft Windows 3.1 and TCP/IP networking software
for the PC that offers a WinSock 1.1 compliant
WINSOCK.DLL.
WLPR.DLL Version 1.0 or later.
WSOCKAID.DLL Version 1.0 or later. Users that run a
TCP/IP stack other than FTP Software's should note the
comment in the "Installation" section below.
Contents
This package contains the spooler (WLPRSPL.EXE) and the
supporting libraries WLPR.DLL Version 1.0 pl 0 and
WSOCKAID.DLL Version 1.0 pl 0 as well as this documentation
in form of a Word for Windows 2.0 .DOC file and a plain
ASCII version.
How does the spooler work?
Every printer used within Windows is connected to a so-
called "port." Examples are LPT1, LPT2, COM1, COM2 etc. But
also normal files can define such ports. When you enter the
line
C:\SPOOL\DRUCKER.DAT=
into the [ports] section of WIN.INI you may later connect a
printer driver to this "port." Every print job sent to this
port is written to the specified file by the Windows Print
Manager. This is what WLPRSPL relies on. WLPRSPL uses a
dedicated directory on the PCs hard disk for spooling (i.e.
C:\SPOOL). This directory has to be specified the first
time you start the program. For each network printer you
want to print to you have to chose a unique file name (i.e.
HP.PCL for a HP LaserJet in PCL mode). This file name
together with the chosen spool directory makes the port (in
this case C:\SPOOL\HP.PCL) to which an appropriate Windows
Printer Driver can be connected. The filename without path
represents the local queue.
The definitions of all local queues are kept in a queue
definition file (which I will abbreviate as QDF from now).
This is an ASCII file which might be edited using a normal
editor. But I suggest that this file be maintained only by
means of the configuration dialogs of WLPRSPL. The file
contains lines of the form
remote-queue remote-host spoolfile options
An example for such a line might be
ich01a4 ich210.ich.kfa-juelich.de HP.PCL v
Each line in this file defines one remote printer. The
individual fields of such a definition are separated by one
or more spaces and have the following meaning:
remote-queue Name of the printer queue on the remote print
server
remote-host Internet hostname or address of the remote
print server
spoolfile Unique spool file name (without path)
options Printing options
If you have selected C:\SPOOL as the spool directory, the
port C:\SPOOL\HP.PCL would be created by the example line
above when the program starts and the port does not yet
exist. Then you could connect the HP LaserJet printer
driver to this port using the control panel. When you later
print to it from any windows application, the Print Manager
writes the printer data to the file C:\SPOOL\HP.PCL.
WLPRSPL then puts the file into its own queueing system and
sends the data to the remote printer queue ich01a4 on host
ich210.ich.kfa-juelich.de.
Installation
Choose a directory where you want to install WLPRSPL and
create it. Move the archive WLPSPnn.ZIP to this directory
and unzip it with PKUNZIP WLPSPnn or any compatible
program. Move all *.DLL files to the Windows directory or
to another directory that is in your PATH, or include the
directory where you installed WLPRSPL into your PATH. Then
either create a new Program Manager group or open an
existing, and install WLPRSPL.EXE there (please refer to
your Windows documentation on how to do this). After that
you can start the program for the first time. For your
convenience you should also install the spooler in your
AUTOSTART group so that it gets launched automatically when
you start Windows.
A note about WSOCKAID.DLL: This is a network software
vendor specific DLL containing a few functions that
WINSOCK.DLL does not offer. Currently.you will not get this
DLL from your vendor. The version in this pack was written
by me explicitly for FTP Software's PC/TCP stack. The
function that WLPRSPL (or better WLPR.DLL) uses is
retrieving the user's login name. If you have FTP
Software's PC/TCP 2.1 or higher, this DLL will take the
needed information from the PCTCP.INI file (or whatever
your PCTCP environment variable is set to). If you use a
different stack, you may create the following section in
your WIN.INI in order to make this version of WSOCKAID.DLL
work:
[WSockAid]
user=<your_userid>
lprserver=<your_default_lpr_server>
lprqueue=<your_default_queue_on_lprserver>
First Start
When you start WLPRSPL for the first time you have to
specify the spool directory you want to use. In the dialog
that appears you can also create new subdirectories. Once
you have selected the spool directory, the place where the
QDF shall be located must be defined. It is possible to use
a shared QDF that resides on a network drive and which is
maintained centrally. The file that you specify does not
have to exist at this time. It will be created as soon as
you define the first queue in WLPRSPL.
After this first time configuration you may define local
queues for all remote printers you want to utilize. This is
described in the next section. After this you should
connect appropriate Windows printer drivers to those ports.
Defining Local Queues
In order to define local queues in WLPRSPL start the
program if not yet running, restore the program window if
the program is iconized, and go through the menu
(Setup/Queues/Define new queue...) or press Alt-Insert. A
dialog pops up where you can enter a new queue definition.
The fields in this dialog have the following meaning:
Local Spool File Name: Name of the spool file (without
path) that shall be used for the local
queue (required).
Remote Queue Name: Name of the queue on the remote print
server (required).
Remote Host Name: Internet host name or address of the
remote print server (required).
LPR Queue Type: Type of the files which will be
printed. This must be a one character
code as defined by RFC 1179 (see Usage
Notes). Default is type 'f'.
Banner Page: Specifies if a banner page shall be
printed for each print job (may be
overridden by server setup).
When you press OK a new port is created. You can not use a
spool file name that already exists. Now you can go to the
Control Panel/Printer Setup, install a printer driver that
matches the remote printer, and connect it to the
previously created port. Take care that all printer
characteristics you define match the remote printer.
Normally a data stream from a Windows printer driver
overrides settings of the remote printer defaults. If you
select settings that the remote printer does not support it
may hang.
After installing the printer driver you may print to the
remote printer from any Windows application.
Adjusting WLPRSPL Parameters
Through the menu (Setup/Timing...) you can get to a dialog
box where you can change the following operating parameters
of WLPRSPL.
Timer Ticks in sec. This entry defines the time steps used
by WLPRSPL to periodically check for possible spool files.
It can be 0 which means that this feature is disabled. When
the Print Manager is used there is no need for this spool
file polling because WLPRSPL is notified through a message
when a spool file is written. But with this feature enabled
it is possible to create spool files in DOS sessions and
have them automatically entered into the WLPRSPL queueing
system (see Usage Notes).
Time to wait for LPR to complete Time in seconds during
which a print job should be completed. If it takes longer
the user is notified and may cancel the transfer.
Max # of tries to send file before queue is disabled Max.
number of retries a print job is allowed to take before the
user is notified of the potential problem. If this number
is reached during a transfer the local queue is disabled
and the user gets a notification. All spool files in the
queue stay there until the user re-enables the queue.
Normally you can leave the default values as they are. If
you notice a performance degradation on slow PCs due to the
spool file polling set the Timer Ticks to a higher value,
or set it to 0 if this feature is not needed. If you often
print large documents or you only have a slow link to your
print server you may want to set the Time to wait... to a
higher value.
WLPRSPL Running ...
When WLPRSPL is active you normally don't notice anything
of its existance because the spooling is done in the
background. So WLPRSPL generally runs as an icon on the
desktop. If you want to change something in the settings,
restore the WLPRSPL window. In this window you see the
following information being displayed:
the time the spooler was started
the currently used spool directory
the currently used Queue Definition File
a listbox displaying the states of all local queues
(more detailed description below)
the Windows printer driver used for the currently
selected (and therefore highlighted) queue
The individual columns in the listbox have the following
meaning:
Symbol If blank the local queue is currently not connected
to a printer driver, if ">" it is connected, if "*" it is
connected and is currently selected as default printer.
Loc. Queue Name of the local queue (and of the spool
file).
Rem. Queue Name of the queue on remote print server.
Host Name of remote print server.
Files spooled
unsucc./succ. Number of print jobs sent over this queue
since WLPRSPL was started or since the queue statistics
were reset.
Files queued Number of unsent print jobs.
Spool retries Number of times the current print job was
tried to be sent.
Disabled queues are shown with red text. A queue that is
active sending a print job is shown in green, and the
statistics are replaced with a progress message.
WLPRSPL Menu Options
In the following list all commands are enumerated that can
be executed through the menu. On the right hand side the
keyboard short cut is shown.
Files
Delete next spool file (Delete)
Delete next spool file in selected local queue.
Delete all spool files in queue
Delete all spool files in selected local queue.
Delete all spool files
Delete all spool files in all local queues.
Kill LPR Task
A currently running transfer is cancelled.
Control Panel
Call the control panel.
Exit (Ctrl-X or Alt-F4)
Exit WLPRSPL.
Queues
Show remote queue status (Ctrl-Q)
Shows the state of the remote queue that
corresponds to the selected local queue by
executing an LPQ request. The dialog box showing
the remote queue status then allows refreshing the
display and cancelling one or more remote print
jobs.
Enable/Disable queue (Doubleclick on queue in listbox)
The selected local queue is enabled/disabled.
Scan queues immediately(Click right mouse button on WLPR
SPL symbol)
The spool directory is scanned for new spool files
immediately.
Reset selected queue (Ctrl-R)
The statistics of the selected local queue are
reset.
Reset all queues
The statistics of all local queues are reset.
Setup
Timing...
Activates the dialog described in "Adjusting
WLPRSPL Parameters"
Spool-Directory...
Activates the dialog for selection of the spool
directory described in "First Start".
Queues >
Define new queue (Alt-Insert)
Activates the dialog for defining a new queue
described in "Defining Local Queues".
Edit queue data (Alt-Enter)
Activates the dialog for defining a new queue
described in "Defining Local Queues". The
dialog is filled with the data defining the
currently selected local queue.
Delete queue (Alt-Delete)
Deletes the currently selected local queue.
Reload queue definitions
Reloads the queue definitions from the
currently active QDF.
Load queue definitions...
Activates the dialog for selecting a QDF
described in "First Start".
Save queue definitions
Saves changes made to a queue definition in the
currently active QDF.
Save queue definitions as...
Saves the current queue definitions to a QDF
which must first be selected. If wanted, this
new QDF can be made the currently active QDF,
which will then be used the next time WLPRSPL
starts.
Changes to queues are not automatically saved. This has to
be done either through Setup/Queues/Save queue definitions,
or by accepting the automatic saving when WLPRSPL (or
Windows) is terminated.
Usage Notes
When the spool directory is changed after the first
installation, new ports are automatically generated for
all local queues in WIN.INIs [ports] section. The user
then has to manually connect all printer drivers to
those new ports. This is currently not done
automatically.
If you have a DOS application that can print to a file
in addition to printing to a real LPTx or COMx, you can
use WLPRSPL to spool those files. Just let the
application print to the file that defines the port for
the desired network printer (i.e. C:\SPOOL\HP.PCL).
Then there are two possibilities to initiate the
transfer: Either you have set the Timer Ticks to a non-
zero value. In this case you only have to wait for the
specified number of seconds, and WLPRSPL inserts the
file into its queueing system. Or you switch back to
Windows with Alt-Tab and select Queues/Scan queues from
the menu.
The state of all queues (enabled/disabled, number and
names of spool files) is saved in the spool directory
as file filename.SPL when WLPRSPL is terminated, where
filename corresponds to the name of the QDF. When, for
example, the name of the QDF is WLPRSPL.QS, then the
name of the queue state file is WLPRSPL.SPL. This file
should not be deleted because it is needed to determine
to which local queue any unsent spoolfiles belong.
When querying the status of a remote queue with the
"Queues/Show remote queue status" menu option you can
also remove one or more remote print jobs by pressing
the "Remove remote jobs" button. Then you get a new
dialog box where you have to fill in the job numbers of
all print jobs you want to cancel, all separated with
blanks. You can also first select the lines in the list
box that show the print jobs you want to cancel. When
you then press the "Remove remote jobs" button, the
first whole number found in each selected line (which
in most cases is the job number) is put as default into
the following dialog.
The following file types are defined by the LPD
specification (RFC 1179) and can be specified in the
queue definition dialog. These types inform the server
on how to process (or filter) the print data. Normally,
since a Windows printer driver generates raw printer
data, the type 'v' should be appropriate for all
queues. But note that not every print server allows
this type for all queues. The LPD that belongs to IBM's
AIX 3.2 for example does not like any other type than
'f' for data sent to a PostScript queue; even 'o'
(PostScript format) is not accepted. What type you have
to select for a given queue depends on the server. A
general rule might be: "First try 'v', if this doesn't
work try 'l', if this still doesn't work try 'f'." This
should cover 99% of all cases (correct me if I'm wrong,
that's just my experience with the printers/servers I
tested the program with).
v Raster or binary format
Data is sent to printer 'as is'.
f Formatted file
All ASCII control characters except HT, CR, LF, FF,
and BS are discarded.
l Print leaving control characters
Like 'f', but control characters are not removed.
o PostScript file
c CIF format
Data is treated as CalTech Intermediate Form
graphics language.
d DVI format
Data is treated as TEX output.
g Plot file
Data is treated as output from the Berkeley Unix
plot library.
n ditroff output
t troff output
p Print with 'pr' command
r FORTRAN file
1st column of file is interpreted as FORTRAN
carriage control.
Licensing and Registration
This software is not free. It is shareware. You are granted
the right to test this software for a period of 30 days.
After this you have to register the product (see
registration form at the end of this document) and, if this
applies to you, pay the required registration fee. Again,
even if you do not have to pay the fee please register the
program in order to keep you informed of program updates
and to give me a feedback on how much the program is used.
You may redistribute this program to other persons as long
as you keep the package complete with all the files that
are listed in the "Contents" section at the beginning of
this document.
If you cannot print the Word for Windows 2.0 version of
this documentation and find the plain ASCII version too
ugly, and are reachable via e-mail, I can send you this
documentation as a PostScript file.
Registration Fee
Individual private users do not have to pay any fee.
Educational institutions belong to Category I, all others
fall to Category II. Please refer to the following table
for pricing according to the number of licenses. A site
license allows you to make an unlimited number of copies
for your site/company.
Licenses Cat. I Price per License Cat. II Price per
License
1-9 20 US$ 40 US$
10 or more 16 US$ 32 US$
20 or more 10 US$ 20 US$
Site License 400 US$ 800 US$
If you want to pay in German currency, multiply the total
amount in US$ with a factor of 1.5 to get the price in DM.
Change Log
Version 3.0 Final Release:
Added the possibility of removing remote print jobs.
Version 3.0 Beta 2:
Fixed a bug in the Spool Directory dialog.
One final word ...
Tell me everything you like or dislike about this program
in order to let me make it better. Tell me about functions
that you would like to see added. Tell me about problems
you have encountered.
You can reach me under the following E-mail addresses
(first in the list preferred):
th.heil@kfa-juelich.de
ich211@zam001.zam.kfa-juelich.de
ich211@djukfa11.bitnet
ich211@ich210.ich.kfa-juelich.de
or by ordinary mail as
Thomas Heil
Hindenburgstr. 50
41352 Korschenbroich
Germany
Registration Form
(Please register WinLPR when you decide to use it beyond
the trial period of 30 days.)
Name:
Institution:
City/Town and
ZIP/Post Code:
State:
Country:
Phone number:
FAX number:
E-Mail address:
Customer Numberfrom a previous registration
I would like to register _______ WinLPR 1.0 licenses
for private use.
an educational/no-profit institution.Total price: US$
a commercial/for-profit institution. Total price: US$
Payment: Cash Cheque
Date/Signature
Please mail this form (with a possible fee included) to
Thomas Heil
Hindenburgstr. 50
41352 Korschenbroich
Germany