Another revision. I would really value insightful comments, corrections to
factual errors and supplemental information. Have I missed some major pro
or con? Thanks in advance.

-- snip --

4.2 Available Solutions

There are several ways to do accounting. A brief overview will here be
given of the solutions available, noting some pros and cons. The solutions
discussed are pre-printing, proprietary software, Hewlett-Packard's
Printer Job Language (PJL), Adobe's PostScript language and the Simple
Network Management Protocol (SNMP).

4.2.1 Pre-printing

These solutions are those where the counting of impressions takes place in
pure software implementations before printing and the actual printer
hardware is not involved at all. Two examples will be given here.

In modern Microsoft Windows operating systems, applications call the
Graphics Device Interface (GDI) to print [Win2k-ProResKit]. The GDI calls
the printer driver for information, which is then used by the GDI to
create a job. GDI then knows the number of impressions of a job and then
delivers it to the spooler. If print output is produced in RAW format, the
GDI is not used.

The spooler logs the number of impressions in the event log where other
software then can check for accounting information. By bypassing the GDI
and sending a RAW job directly to the spooler, the spooler will log the
job with zero impressions.

Ghostscript is a cross-platform interpreter for PostScript. It can be used
to count the number of impressions of a job before it is sent to the
printer. According to the grapevine, there exist ways to fool Ghostscript
into miscounting.

Any pre-printing solution suffers from the fact that the printer may not
actually print all pages. For example, the printer could jam, or run out
of paper or toner. The user would still get charged. This means that a
pre-printing solution does not fulfill Requirement 5.

4.2.2 Proprietary Software

Several printer manufacturers offer proprietary software solutions that
sometimes only work with their printers. These run on certain platforms
only and often do not offer open access to data. As a packaged solution,
one can say that these does not fulfill Requirement 2 nor Requirement 3,
and sometimes not even Requirement 1.

4.2.3 PJL

Hewlett-Packard's Printer Job Language (PJL) is used by many existing
accounting applications. A connection is held open to the printer after
the job has been sent to it, periodically querying for whether the job is
done or not. Before the job and when the job finishes, the total number of
impressions is read. The number of impressions used by the job can then be
calculated. The PJL commands JOB, EOJ, ECHO and USTATUS can be used to
retrieve the total number of impressions and check on printer status
[PJL].

Pros of this solution is that almost all printers on the market today
support PJL according to their specifications. According to the grapevine,
the support is in reality sketchy. What the commands return and when,
while clearly specified in the technical reference manual, differs. One
has to make sure that the commands really work and return what they are
supposed to. It is hard to know whether the number of impressions is
actually correct.

Writing a general implementation that works with several printer models
from different manufacturers could turn into a game of rules and
exceptions.  Consequently, Requirement 1 and Requirement 5 are not clearly
fulfilled.

4.2.4 PostScript

Adobe's PostScript language is an interpretive programming language with
powerful graphics capabilities [PS]. Its primary application is to
describe the appearance of text, graphical shapes, and sampled images on
printed or displayed pages.

PostScript language level 2 implementations version 2011 and greater, and
PostScript language level 3 implemenations feature a new system parameter
PageCount [PS]. But not all products do necessarily support it.
PageCount tracks the number of pages that have been successfully processed
since manufacture, counting the number of copies for each showpage
(multiplicated with the number of pages requested for every showpage).
Pages not physically printed are counted, making the count inaccurate
during the job, but accurate after adjustment at the end of the job. This
is what the specification say at least.

Just as with PJL, a connection is held open to the printer after the job
has been sent to it. A control sequence is sent in order to retrieve the
status of the printer. Whether you get the status this way depends on the
printer. Some printers, according to reports on the LPRng mailing list,
stop responding when they run out of paper. If one manages to verify that
the printer has finished with the job, commands can be issued to retrieve
the system parameter PageCount. By using the PageCount value from before
the job and the one retrieved after the job, the number of impressions
used during the job can be calculated.

PostScript is often supported by accounting applications as an
alternative, or supplement, to PJL. On the pro side for this solution is
that many printers support PostScript today. They though have different
implementations and support different language levels.  Whether they
support the needed features may be uncertain. One may have to use
different PostScript code with each printer for it to work correctly. From
this one can see that Requirement 1 and Requirement 5 are not clearly
fulfilled.

4.2.5 SNMP

The Simple Network Management Protocol (SNMP) is a definition of a
protocol by which management information for a network element may be
inspected or altered by logically remote users [RFC1157]. Together with
companion memos which describe the structure of management information
along with the management information base (MIB), these documents provide
a simple, workable architecture and system for managing TCP/IP-based
networks.

Two of these companion memos are of particular interest to us. The Host
Resources MIB provides two status objects, hrDeviceStatus and
hrPrinterStatus, which describe many of the states of a printer [RFC2790].
The Printer MIB provides another object, prtMarkerLifeCount, which gives
us the count of the number of units of measure counted during the life of
the printer using units specified in the object prtMarkerCounterUnit
[RFC1759].

SNMP is independent of the process of sending the content of the job to
the printer. By using the two status objects to monitor whether the
printer is done printing, and the counter object to retrieve the number of
impressions before and after a job, an accurate number of actual printed
pages can be calculated. The counter is located in the printer and counts
only the number of impressions actually printed.

Support for SNMP in printers has become more important and has seen an
upsurge since generic SNMP-based monitoring tools have become increasingly
popular. Most printers on the market today support the two MIBs needed for
the SNMP solution. There are exceptions though, but the consensus seems to
be that more printers work with the SNMP solution compared to the PJL
solution. Requirement 1 and Requirement 5 are fulfilled as long as one
makes sure the printers in use (or being acquired) have proper SNMP and
MIB support.

4.2.6 Conclusion

With its increasing support in printers, the SNMP solution seems to be the
best option. The same general implementation would work with several
printer models from different manufacturers, as long as the printer
supports SNMP and mentioned MIBs properly. As the SNMP solution is
independent of the process of sending the content of the job to the
printer, it reduces the number of places where things could go wrong. The
SNMP solution will be discussed in more detail in Section
[sec:Accounting--SNMP].

-- snip --

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to