The general principle of our filter is to keep sending ^T's and watching
the pagecount until it stabilizes.
The pseudo code reads as follows:
read any lingering data the printer has to say
send any initilization to printer
sync with printer or die messily
get a pagecount using a postscript program
sync with printer or die messily
while there is data to be sent to the printer
send a little of it
see if the printer produced any output
in a loop do this
sleep for 1/4 second
send a postscript status request to the printer
if idle or waiting, increment a status counter
if anything else set status counter to 0
the status counter is 25 then we are good
restart loop unless status counter has reached 25 ten times a row
sync with printer or die messily
get a pagecount using a postscript program
if this is the tenth final pagecount, die messily
if no pagecount, start loop again
if final pagecount == initial pagecount, start loop again
This doesn't work on phasers, we do something different on phasers.
On Fri, Mar 16, 2001 at 08:08:02AM +0300, Alex Malev wrote:
> Hi, Can you help me? Can you describe principles in general... How does
> it work? I wrote the same system for university (control and account
> network printing) via special lprng print server, where I setted own
> filter on lpng and accounting database.
>
> Sorry for my English, I am a second year student. I wanna think you
> understand me.
--
William Colburn, "Sysprog" <[EMAIL PROTECTED]>
Computer Center, New Mexico Institute of Mining and Technology
http://www.nmt.edu/tcc/ http://www.nmt.edu/~wcolburn
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------