Hello,
I have a little problem with my accounting process.
I have one HP 4000N and one HP 4050N network printers. Here is my
'/etc/printcap' file section for my HP 4050N :
hp4050n:\
:sd=/var/spool/lpd/hp4050n:\
:lp=/dev/null:\
:printer_ip=XXX.XXX.XXX.XXX:\
:port=9100:\
:as=--> ORIGINE $n $P $t:\
:ae=|/var/spool/lpd/hp4050n-acct.pl:\
:af=/var/spool/lpd/hp4050n.acct:\
:lf=/var/spool/lpd/hp4050n.log:\
:bl=:\
:user=daemon:\
:sh:\
:mx#0:\
:lpd_bounce=true:\
:if=/usr/lib/printfilters/master-filter:\
:PAPERSIZE=a4:\
:DESIRED_TO=ps:\
:PRINTER_TYPE=REMOTE:\
:ASCII_TO_PS=YES:\
:GSDEVICE=POSTSCRIPT:\
:RESOLUTION=600x600:\
:PS_SEND_EOF=YES:\
:NUP=1:\
:RTLFTMAR=18:\
:TOPBOTMAR=18:\
:TEXT_SEND_EOF=NO:
My accounting perl script read (IO::Socket::INET->new) the internal hardware
page counter using the Printer Job Language and write it in my 'af' file
(/var/spool/lpd/hp4050n.acct) :
...
[EMAIL PROTECTED] JOB\x0a
[EMAIL PROTECTED] INFO PAGECOUNT \x0a
\x1B\%-12345x
...
All works well except that I don't know how to tell my script to wait the end
of the last print job before reading the HP 4050N internal page counter. For
example, if several jobs are sent in the same time I have almost the same
page counter which is wrong.
I think that the chronology of the different print events is this one :
+<- J1 ->+<- AS1 ->+<- P1 ->+
++++++++++++++++++++<- AE1 ->+
+++<- J2 ->+<- AS2 ->+<- P2 ->+
++++++++++++++++++++++<- AE2 ->+
( -->-- TIME -->-- TIME -->-- )
J1 = job send by user1
AS1 = accounting start for job1
P1 = print pages of job1
AE1 = accounting end for job1
J2 = job send by user2
AS2 = accounting start for job2
P2 = print pages of job2
AE2 = accounting end for job2
I am sure that AE2 start before the end of the P1 !!!
My questions are very simple :-)
Is it possible to wait the end of the last print job before starting the new
one and how can I do it in PJL ?
Best regards.
Mr FARGET Vincent.
--
Universite Claude Bernard LYON 1
CNRS - UMR 5020
Laboratoire des Neurosciences et Systemes Sensoriels
50, avenue Tony Garnier
69366 LYON Cedex 07
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------