SUMMARY: pages counting

From: Rashad Al-Yawir (
Date: Wed Apr 03 1996 - 02:58:54 CST

Hi managers,

        Last week I asked the following question :
> I am looking for a software that allow me to count the pages sende to
> the printers attached to our Sparcs. I am interested in counting HP files and
> PostScript files. Any help will be preciated.

        I did not mentioned that we are using Solaris 2.4. I received 4 answers
which I included below. I still looking for a software that allow me to count
pages for PCL, HPGL files. For PS files I use psselect as follow :

psselect -p1- file >/dev/null 2>/tmp/##pages##
PAGES=`cat /tmp/##pages## | awk '{print $(NF-3)}'`

                                Thank you very much
                                   Rashad Al-Yawir


From: charest@sar3.CANR.Hydro.Qc.CA (Claude Charest)
> > l'imprimante le nombre de page qu'elle imprime
> >
> > "hpfilter - networked HP laserjet filter with page accounting"
> > --------------------------------------------------------------------------
> J'inclus le URL vers le fichier :
> La beaute de ce filter est qu'il n'a absolument pas a fouiller dans le
> fichier source, demandant plutot a l'imprimante le nombre de pages qui
> ont ete "ejectees" entre le debut et la fin de la job.
> Stephane M. Desmarais ( a une solution qui
> utilise une commande Postscript "statusdict begin pagecount = end", et
> nous avertit de ceci (peut-etre que la solution precedente en est aussi
> affecte):
> > En passant, si tu demande trop rapidement a une imprimante HP4
> > (ou etait-ce sur les HP3???) son compteur de page, avant que le
> > papier ait fini de sortir, le resultat sera d'une ou 2 page trop
> > petit!!!!
> >
> > il faut donc absolument demander a une imprimante son nombre de page
> > plus qu'une fois, et passer au vote!
> Enteka c'est pas mal ca. Je suis ouvert a d'autres
> commentaires/suggestions sur le sujet du page accounting sur imprimantes
> laser. De meme, je suis toujours interesse a consulter le PJL Tech Ref
> Manual (pour HP LJ 4M, 4M+).
> Salut a tous !
> Luc

From: <>

if you enable system accounting you'll get what you want



From: Marcelo Maraboli <>

I made a C program that uses dvilj, looks inside a .ps (there is a line that
says %%Pages: 5 for 5 pages), and it logs the username...
so it is useful to account printed pages..

I'm afraid that the .lj (if you ave a laserjet) controls depend on the
software and version of who creates it.

for the .ps, make a script or a C's easy..


From: Leonard Sitongia <>

The JetAdmin software, which manages ethernet-connected HP printers, does
provide some page-counting. If you turn on the Status Log under the
spool queue configuration menu, you will get some page counting. I think
you have to turn on True-end-of-job, too.


This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:56 CDT