home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
p
/
pcnt21.zip
/
PCOUNTER.TXT
< prev
next >
Wrap
Text File
|
1992-12-18
|
25KB
|
606 lines
PCOUNTER
A Page Counting Print Server
for
Novell NetWare Networks
Version 2.1
Copyright (c) 1992 A.N.D. Technologies
--------
OVERVIEW
--------
PCOUNTER is a Novell Netware based Print Server which runs on a
dedicated CPU. Its function is to not only handle print jobs and
manage print queues but also to count pages on PostScript and HP
LaserJet compatible printers. It can also print ASCII text input
on PostScript printers.
PCOUNTER is both a NetWare print server and accounting server. It
subtracts the usage amount from the users' account balances and
keeps a log record so that the network supervisor can track printer
usage. Serial printers are supported up to 115K BAUD on RS-232 ports.
PCOUNTER can work with remote printers attached to workstations
and printers with network interfaces installed.
The PCOUNTER console can be used to view and delete print jobs.
Three additional programs are provided to facilitate PCOUNTER's
usage: PCONFIG, BALANCE, and DEPOSIT.
HARDWARE REQUIREMENTS
---------------------
PCOUNTER requires a dedicated CPU. Any old 8088 based computer
will do. No hard disk is necessary. A network interface certainly
helps. Page counting requires a PostScript or HP LaserJet
compatible printer. 256K of free RAM after drivers are loaded
should be sufficient, although that amount varies according to
the number of queues serviced. PostScript printers require a
serial port.
SOFTWARE REQUIREMENTS
---------------------
DOS 3.0 or above, NetWare 2.1 or above with accounting installed.
NOTE
----
Until you register PCOUNTER, its use will be restricted to one
queue, one running copy per network, and one hour running time.
The complete version supports 16 queues on eight file servers and
as many print servers on your network as you require, and of
course, no restriction on running time. See the final page for
details on how to register for the complete version.
LaserJet, HPGL, and PCL are trademarks of Hewlett-Packard, Inc.
PostScript is a trademark of Adobe, Inc.
NetWare is a trademark of Novell, Inc.
PCONSOLE, SYSCON, CAPTURE, ENDCAP, NPRINT, PRINTCON, RPRINTER, and ATOTAL
are copyrighted by Novell, Inc.
DOS and WINDOWS are trademarks of Microsoft, Inc.
WordPerfect is a trademark of WordPerfect Corporation.
-------------
UPGRADE NOTES
-------------
Current users of version 2.0 will need to run PCONFIG for each PCOUNTER
print server, although no configuration changes need to be made.
There are no actual new features in 2.1, but the following code changes
were made:
1> PCOUNTER 2.1 is much quieter in terms of network requests. In response
to complaints about increased network traffic, we have decreased polling
times and adjusted other culprits.
2> We tightened up the serial port interface code for better PostScript
status control.
3> Adjusted the HP LaserJet page counting scheme for the LaserJet 4,
although testing was limited to WordPerfect 5.1 and Windows 3.1 drivers.
Please let us know if there are any problems involving other software
packages.
-------------------
FUTURE ENHANCEMENTS
-------------------
Features which we'd like to implement in future versions include PostScript
support for parallel/network interfaces, screen blanking, non-US currency
(and language?) support, and queues linked from UNIX systems by the Charon
4.0 gateway. If there are other features you'd like to see, let us know!
Contact us at:
A.N.D. Technologies
P.O. Box 64811
Los Angeles, CA 90064
Compuserve - 71011,3570
Internet - 71011.3570@compuserve.com
----------------------
PCOUNTER CONFIGURATION
----------------------
PCOUNTER comes with an associated configuration program called
PCONFIG. It is not necessary to use NetWare's PCONSOLE program
to configure a PCOUNTER Print Server; however, you may still wish
to use PCONSOLE to manage print queues and add additional properties.
Unlike PCONSOLE, users may not use PCONFIG to access or view queue
configurations unless they have supervisor-equivalent rights or
have write access in a file server's bindery. PCOUNTER supports
print service on up to eight file servers; therefore you must be
a supervisor on each file server you wish to use PCOUNTER on.
PCONFIG will not allow any configuration conflicts. For example:
You cannot configure two queues linked to the same port to have
different baud rates or different buffer sizes;
You may only configure a PostScript queue for a serial port.
Aside from that, PCONFIG is used intuitively. Special keys are:
Ins - add a new queue
Del - delete a queue
F1 - more parameters
F5 - remove a queue from service but don't delete it
PgUp/PgDn - Change numerical or predefined discrete values
Enter - Change any text based, user entered values
Esc - Quit
The configuration information for each queue is automatically
stored in the file server's bindery upon exit from PCONFIG. No
saving is necessary.
To execute PCONFIG, type PCONFIG or PCONFIG printservername.
-------------------------
THE PCOUNTER PRINT SERVER
-------------------------
PCONFIG creates the print server if it doesn't already exist on
the default file server and also asks if you would like to create
it on all attached file servers on which you have bindery write-
access. You must create the print server on all file servers
where you wish queues to be serviced. PCOUNTER print servers are
created with no password and have no facility for passwords, so
don't try to set it or PCOUNTER won't run! You must also have
installed accounting using SYSCON! The print server is set up as
an accounting server in each file server's bindery, and as a
queue server and queue operator for each print queue it services.
Just as each user gets a mail directory with his/her own user ID
number, the print server gets a home directory. However, instead
of it being a subdirectory of \MAIL, it is a subdirectory of
\SYSTEM. Therefore, if the print server's ID is 15000007, its
home directory is \SYSTEM\15000007. The print server has read,
write, and create access in this directory, and here is where it
writes log files and reads header and footer files. The print
server keeps a running log of all print activity in an ASCII file
called PRINT.LOG. PRINT.LOG contains the same display generated
on PCOUNTER's screen console. You may wish to map a permanent
drive to this directory using the MAP command so you don't have
to memorize the print server's ID.
PCOUNTER's screen console contains three windows: "Recent Print
Jobs", "Pending Print Jobs", and status lines for each connected
printer. "Recent Print jobs" displays the username, banner,
date, time, size, pages, cost, and account balance. This is the
information which is written to \SYSTEM\"PCOUNTER_ID"\PRINT.LOG.
"Pending Print Jobs" displays name and size.
Pressing F1 opens a window from which anyone can view or delete a
print job. Pressing F8 pauses PCOUNTER until another key is hit.
*********** Ctrl-End exits PCOUNTER and logs out. *************
IMPORTANT!
----------
PCOUNTER logs in simultaneously to all file servers on which it
resides where there are print queues to service. A user with
accounts on different servers may have separate accounts updated.
PCOUNTER updates the account ON THE FILE SERVER WHERE THE PRINT
QUEUE RESIDES.
------
QUEUES
------
All queues have certain information associated with them: type, port,
price, info, buffer size, header, header delay, footer, footer delay,
zero flag, and serve-if-negative-balance flag.
-----------
QUEUE TYPES
-----------
Each queue serviced by PCOUNTER must be of a certain type, and should only
contain print jobs of that type. The types supported are PostScript Only,
ASCII Text to PostScript Only, PostScript and ASCII Text Conversion,
HP Laserjet, and Charge Per Job. A queue is linked to a port upon which
a printer is attached which can read this type of print job.
PostScript only queue types should be linked to a PostScript compatible
printer. After each job, a CTRL-D (Hex value 04, reset) byte is sent to
the printer in order to reinitialize it for the next job. PostScript
page counting is supported only with a serial port connection, although we
hope to support parallel ports in future versions. Users' accounts are
charged a price per page times the number of pages printed. Print jobs
should only contain PostScript code.
ASCII Text to PostScript queues only have the same qualities as PostScript
queues above, except that all print jobs convert ASCII text to PostScript
before being sent to the printer. Any characters extending beyond the
printable right margin are wrapped around to the next line. The font used
is always Courier.
There are attributes of a Text To PostScript job which are user configurable:
point size, page orientation, bold, tab size, and margins. One may include
an optional first line (which is not actually printed) in the text file to be
sent with the syntax in either uppercase or lowercase:
%* [Sn] [L] [B] [Tn] [MTf] [MBf] [MLf] [MRf]
where n = an integer value
f = an integer and/or fractional value
S = point size from 3 to 100 (default=12)
L = landscape orientation (default=portrait)
B = Courier Bold typeface (default=Courier)
T = tabsize in spaces (default=5)
Mx = margin size in inches (default=0.5 inch)
(Top, Bottom, Left, Right)
Not all of the above options need to be specified, for example,
"%* S14" would print in portrait orientation using Courier 14pt;
"%* L B " would print in landscape orientation using Courier Bold 12pt;
"%* MT1.5 MB1.5 would set top and bottom margins to 1.5 inches.
Some programs have options for setup strings. Here a code for a
carriage return is necessary, for example "%* S8\010".
PostScript and ASCII Text Conversion queues combine qualities of the previous
two queue types. PCOUNTER scans the print data and decides whether it is
PostScript or whether to convert text to PostScript. It discards any print
job which begins with an escape code (HP, Dot-Matrix Printers). A standard
PostScript file identifies itself with the first line '%!' (not including
quotes). However, not all software packages observe this custom, and PCOUNTER
tests further to protect against such occurrences. If PCOUNTER fails to detect
a PostScript file, please contact A.N.D. Technologies, and state the name of
the offending software and, if you can, the first page of PostScript code.
!!!!!!!! WARNING !!!!!!!!
Some software will take a long time generating PostScript output; those for
graphics and CAD in particular. If you are using CAPTURE to access print
queues, you may need to increase the timeout value in order to avoid breaking
up the print job into pieces. This can result in PostScript code being
converted to text and many unnecessary pages printed.
HPLaserJet queues should be linked to an HP LaserJet compatible printer.
After each job, a reset sequence (ESC,E) is sent to the printer to
reinitialize it for the next job. These queues are supported on all ports.
Print jobs may contain up to PCL 5 or ASCII text. Graphics and soft fonts
are supported. Users' accounts are charged a price per page times the
number of pages printed.
Charge Per Job queues may be linked to any kind of printer or port; however,
pages are not counted and the print data is not analyzed or modified in any
way. Users' accounts are charged a fixed price for each print job.
-----
PRICE
-----
This is a US Currency amount (range $0.00 - $99.99) which refers either to
the price per job (Charge Per Job queues) or to the price per page (all
other queues). NetWare internally keeps account balances in terms of units.
PCOUNTER assigns one unit equal to one U.S. cent. If you don't wish to
charge for certain jobs, set the type to Charge Per Job and the price to zero.
-----
PORTS
-----
The options are numerous.
You may link:
One queue ---> One Port
One queue ---> Multiple Ports
Multiple queues ---> One Port;
provided no configuration conflicts occur (see above).
A total of eight "ports" are supported: COM1-COM4 (serial),
LPT1-LPT3 (parallel), and Another Printserver.
Serial Port (RS-232) baud rates are supported up to 115K BAUD. Serial
printers should be set for XON/XOFF protocol, 8 Data bits, No Parity,
and 1 Stop bit.
COM3 and COM4 are untested. Unfortunately, there are no standards for COM3
and COM4. Each port requires its own address and IRQ (Interrupt Request)
number. The most common address for COM3 is 3E8 and for COM4 is 2E8, but
different boards may use different addresses. Likewise, COM1 uses IRQ 4 and
COM2 uses IRQ 3. Serial ports may not share an IRQ if you wish to use them at
the same time. LPT1 uses IRQ 7. IRQ 5 is used by LPT2 on the AT and by the
Hard Disk system on the PC/XT. IRQ 6 is used by the Floppy Disk system. Also,
your network card may require use of an IRQ.
PCOUNTER uses the following defaults:
COM3 - address 3E8 - IRQ 5
COM4 - address 2E8 - IRQ 7
You may change these defaults on the command-line:
PCOUNTER printservername [/C:I:A] (no acronym intended)
where C=COM #
I=IRQ #
A=Address in Hex
example: PCOUNTER PSERVER1 /3:7:220 /4:5:210
As mentioned above, PCOUNTER only supports PostScript accounting
over serial ports.
Some "smart" printers can arbitrate incoming jobs between its
various ports and also select a printer mode based upon incoming
data. If your printer cannot do this, then you should not
configure a PostScript queue and an LaserJet queue to be serviced
on the same port.
Parallel Ports require no special configuration.
Another Printserver (PS->) is included here as a "port" in order
to take advantage of NetWare's remote printing capabilities and
printers with built-in network interfaces. If your version of
NetWare does not support this feature, then skip this section.
Otherwise, here it is conceptually:
1 - Job is placed in queue with PCOUNTER as target print server
2 - PCOUNTER counts pages, charges account
3 - PCOUNTER sets NetWare print server as target
4 - NetWare print server prints job remotely
In order to configure this scenario, you must have previously
used PCONSOLE to configure the NetWare print server as a queue
server for the current queue and set up the remote printing
parameters. If you choose "PS->" as a port, all print servers
which service the current queue (except the one you're currently
configuring) may be chosen in the "Info" field by pressing PgUp
or PgDn.
Finally, to implement our scenario, you must specify the PCOUNTER
server as the target print server either on the command line to
CAPTURE or NPRINT or as part of a print job configuration using
PRINTCON. If you fail to specify a specific target print server
then the wrong print server could grab the job first. For more
information on NetWare, check your manuals!!
Once PCOUNTER has charged a user for a print job on a queue with
the "PS->" option, it sets the target print server as the one
referred to in the configuration. However, PCOUNTER does not
know what happens to the print job after that; such as whether it
was actually printed or not. For that reason PCOUNTER will not
service a job in this way unless the other print server is also
attached to the queue.
-----------
BUFFER SIZE
-----------
This specifies the size of the data chunks sent to the printer.
The sizes range from 64 to 8K bytes. However, if the buffer size
is too large and the printer's receive buffer fills up then PCOUNTER
may have to wait. It is especially recommended to use small
buffer sizes on slow dot matrix printers. You may need to try
different values to see what works best for you.
--------------------------------------
HEADER FILES, FOOTER FILES, AND DELAYS
--------------------------------------
This feature serves multiple purposes. Header and footer files
may contain special printer command data for setting up certain
jobs, may be used for soft fonts, or may contain printer codes
for emulating other printers. In the latter case, perhaps you
have a PostScript printer which can also emulate an HP LaserJet
or plotter. PCOUNTER can count pages in this fashion if the
default mode for the printer is PostScript, the header file is a
command to start the emulation, and the footer file is a command
to return to PostScript mode. This is where the delay enters the
picture. After you start or stop an emulation, the printer may
need time to reinitialize. If more data is sent too quickly,
data may be lost; or the printer could hang. Again, you may need
to experiment to discover the optimum setup.
PCOUNTER may not count pages correctly using the emulation
technique described above on a printer whose default mode is not
PostScript. For example, printers which support PCL5 (LaserJet
III, IIIP, etc.) are able to have HP plotter (HPGL) commands
embedded in PCL5 data. PCOUNTER can handle PCL5 data containing
embedded HPGL if the queue type is HP LaserJet, no header or
footer files are defined, and the job is sent. However, if you
set the header and footer to be PCL5 commands and the print job
is strictly HPGL, then PCOUNTER would treat the HPGL data as
ASCII text and perhaps count the wrong number of pages.
Header and Footer files MUST be placed in the print server's home
directory. If a header or footer is specified in the
configuration and is not in the home directory, PCOUNTER refuses
to service the queue.
EXAMPLES PostScript --> HPLJ HPLJ --> PostScript
serverdict begin 0 exitserver using [ASCII] values
statusdict begin
5 setsoftwareiomode end [27][16][48]
Check your printer manual for emulation commands.
---------
ZERO FLAG
---------
This flag determines whether PCOUNTER should send a broadcast message after
a print job if the user's account balance is zero or negative.
-------------------------
SERVE IF NEGATIVE BALANCE
-------------------------
This flag determines if PCOUNTER should print a queue job if the
user's account balance is zero or negative.
------------
BANNER PAGES
------------
ARE NOT SUPPORTED ---- Save a tree today!
-----------------------------
OPTIONS FOR STARTING PCOUNTER
-----------------------------
PCOUNTER printservername [/C:I:A] (no acronym intended)
where C=COM #
I=IRQ #
A=Address in Hex
example: PCOUNTER PSERVER1 /3:7:220 /4:5:210
NOTE: printservername is required.
See PORTS for explanation.
For simplicity and efficiency, you may wish to place PCOUNTER.EXE on
a boot disk(ette) or in the \LOGIN directory so that PCOUNTER automatically
starts up at boot time. When PCOUNTER runs, the workstation is logged
in automatically to all file servers specified in PCONFIG. To exit PCOUNTER
type CTRL-END, and the workstation is logged out.
---------------------
NOTES FOR SUPERVISORS
---------------------
When accounting is installed, NetWare creates a log file called
NET$ACCT.DAT in the \SYSTEM directory. An entry is added to the
file for each "accounting" occurrence, including logins, logouts,
PCOUNTER transactions, and optionally connect time and disk usage.
Thus it can become a huge file if left unnoticed. The NetWare
program ATOTAL is used to view statistics of this file. If you
don't need to check this information then feel free to delete it.
The same goes for PRINT.LOG in the print server's home directory.
The nature of the HP LaserJet Printer Control Language (PCL) is
such that, unlike PostScript, two way communication between the
computer and the printer is not supported. Therefore the print
data must be examined and the number of pages then calculated.
Given that there are countless combinations of PCL commands which
can eject a page, and that the PCL data may be itself incorrect
(such as font commands when a cartridge does not exist), there is
no guarantee that PCOUNTER will count correctly 100% of the time.
However, for software programs configured correctly which format
print data, there should generally be few problems. As of version
2.1, there has been limited testing with the LaserJet 4, but it
seems to be OK!
-------------------
ADDITIONAL PROGRAMS
-------------------
---- BALANCE.EXE ----
usage: BALANCE [fileservername] [/ALL]
Displays the user's account balance from the default or specified
file server on the screen. It returns DOS Errorlevel 1 if the
account balance is zero or negative. You may use this in a batch
file to restrict access to network printers.
ex. :
CAPTURE
BALANCE
IF ERRORLEVEL 1 ENDCAP
:
The /ALL option will display a list of all users and their
balances on the screen. The output may be redirected to a file
for recording purposes.
ex. BALANCE FS1 /ALL >BALANCES.ALL
will list all users and balances in the file BALANCES.ALL.
---- DEPOSIT.EXE ----
usage: DEPOSIT [[fileservername/]username] [amount]
This program is restricted to supervisors only. If "fileservername/"
is omitted then the deposit is made to the user's account on the default
file server.
ex. DEPOSIT JOHN 3
DEPOSIT FS1/MARY 7.50
If you wish to record deposits in \SYSTEM\"PCOUNTER_ID"\PRINT.LOG, then
you (the supervisor) should set a DOS environment variable PCOUNT to the
name of the print server in whose PRINT.LOG you want the deposits
to be placed.
ex. SET PCOUNT=FS1/PSERVER1
If you wish, you may place a command in your login script to set PCOUNT
automatically for example: DOS SET PCOUNT="FS1/PSERVER1".
If PCOUNT is not set, you will receive the message: "Deposit not recorded
in PRINT.LOG". However, the deposit is still made.
Also provided for your convenience is DEPOSIT.PIF for use with Microsoft
Windows 3.1.
-----------
INFORMATION
-----------
PCOUNTER IS DISTRIBUTED AS IS, WITHOUT ANY EXPRESS OR IMPLIED
WARRANTY. NO RESPONSIBILITY OR LIABILITY WILL BE ASSUMED BY
A.N.D. TECHNOLOGIES FOR ANY FAILURE OF THIS SOFTWARE, OR ANY
PROBLEMS OR DAMAGE ENSUING THEREBY. USAGE OF THE SOFTWARE IS
CONSTRUED AS ACCEPTANCE OF THIS DISCLAIMER OF LIABILITY.
Until you register PCOUNTER, its use will be restricted to one
queue, one running copy per network, and one hour running time.
The complete version supports 16 queues on eight file servers and
as many print servers on your network as you require, and of
course, no restriction on running time.
PCOUNTER is shareware. You may distribute the unregistered
version of PCOUNTER at no charge but please distribute it in the
archived file PCNT21.ZIP - which include the files PCOUNTER.EXE,
PCOUNTER.TXT, DEPOSIT.EXE, DEPOSIT.PIF, BALANCE.EXE, and PCONFIG.EXE.
To register PCOUNTER, please send $45 U.S. currency plus $20 for
each additional network license to:
A.N.D. Technologies
P.O. Box 64811
Los Angeles, CA 90064
Please include your name, company, mailing address, E-Mail
address(es), and how you learned about PCOUNTER.
****************************************************************
If you intend to use more than one PCOUNTER print server on your
network, please order the necessary number of licenses; PCOUNTER
knows how many copies are running at any time and will exit if a
licensing error is detected.
****************************************************************
Please feel free to leave questions, comments, and suggestions for
improvements at:
Compuserve - 71011,3570
Internet - 71011.3570@compuserve.com
By supporting PCOUNTER now you will be supporting future versions.
After you register, your license(s) will be valid through the
current version number plus one; i.e. - 2.1 through 3.1;
2.2 through 3.2, etc.
PCounter - Copyright (c) 1992 A.N.D. Technologies
********************************************************
Also look for PSPS - the PostScript PrintScreen Utility!
as PSPS11.ZIP
Version 2.0 is almost ready!
********************************************************