[WinMac] WinMac Digest #388 - 08/12/99


Paulo Licio de Geus(paulo[at]dcc.unicamp.br)
Fri, 13 Aug 1999 08:44:53 -0500


On Thursday, 12August1999, The Windows-MacOS cooperation list wrote:
> Subject: LaserWriter Page Count
> From: Romeyn Prescott <prescor@potsdam.edu>
> Date: Thu, 12 Aug 1999 13:00:13 -0500
> Mime-Version: 1.0
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
> I'm developing a printer page accounting system, and need to count
> the number of PRINTED pages in a postscript file. I intercept this
> file when the client "prints" it, and then send it onto the
> destination printer. Is there any 'form feed' command or 'end of
> page' command I can "count" in a PS document to do this page count?
>
> Alternatively, are there commands I can send to an Apple LaserWriter
> to have it send back the current page count? With HP printers I can
> send the command '@PJL INFO PAGECOUNT' to the JetDirect card before
> and after a print job has been printed, to determine the number of
> pages printed, Apple seems to provide no such mechanism.
>
> Thanks in advance,
> >...ROMeyn

After reading other replies to your question, I can't let you without
the "proper" way to do page count on a PostScript printer. There's a
primitive called something like, surprise, "pagecount", in the
PostScript interpreters in printers. You can then control spooling in
a smarter way by sending a small PostScript program in between jobs,
with that command and getting the current page count in return, as a
small interactive job. This is stored in non-volatile RAM, so you can
really keep track of page usage over the printer's life. It's the
same PS command that the Apple LaserWriter administration tool (real
name?) used to get the page count. I used to monitor cartridge life by
reading following the page count after replacements.

I even had students write, in my Unix Network Administration course,
the filters necessary to do this over lpd. I got some weird results
from a team that undertook this task: on a HP 4M, the PS pagecount
wouldn't change after any print, returning always the same value, but
the JPL (is this correct? the native command language...) version did
work. On a HP 4M plus both of them worked well.

Unfortunately, I would have to dig very far to find the project
documentation, and probably wouldn't find it. However, LPRng seems to
have this ability built-in. You may not want to change platforms to
run LPRng, but you could look at the code (if this feature is there,
of course).

Cheers,

-- 
Paulo Licio de Geus		    Internet: paulo@dcc.unicamp.br
Instituto de Computacao	- UNICAMP   voice: +55 19 788-5865
Av. Albert Einstein, 1251	    mobile (cel): +55 19 995-1831
caixa postal: 6176		    fax: +55 19 788-5847
13083-970  Campinas SP Brazil       http://www.dcc.unicamp.br/~paulo

* Windows-MacOS Cooperation List *



This archive was generated by hypermail 2.0b2 on Fri Aug 13 1999 - 06:51:40 PDT