wilensky@aaet.csc.ti.com (Harold Wilensky) (06/29/89)
Can anyone enlighten me about this? I am trying to write an output filter for a special printer on a Sun386i. My output filter has been defined in the ypprintcap entry for this printer using the "of" parameter. Making the filter operate on the file has not been a problem. However, I can't seem to generate a banner page. The information I need for the banner page is file name, print job submitter, host from which the print was requested, etc. The problem is that lpr only passes two arguments to the output filter: page length and height. I discovered that the control file (sometimes called the cf file) that is placed in the spooler directory (as defined by the "sd" parameter in ypprintcap) contains that information. By reading the "lock" file in the spooler directory, I can find out the name of the control file. However, when my filter tries read the control file, it no longer exists. I think that the cf file must get deleted before the output filter goes active. That raises the question in my mind of just how do banner pages get created. For example, if you use lpr without any filters and print to an Epson-type printer you get a banner page. It's not very pretty, but you get it. Who generates it? Does lpr itself do it? If so, I don't want lpr to write a banner page to the printer because it messes up my printer because my output filter has not had a chance to send all of the appropriate control codes to the printer. Because of this, I suppress the banner page that would normally come out. So, the bottom line question is, "How do I generate my own banner page?" Here is a copy of the ypprintcap entry I use... mite|mite-pp0:sh:lp=/dev/pp0:\ br#9600:rm=mite:rp=mite:sd=/var/spool/mite:\ sf:pl#60:pw#80\ of=/home/wilensky/ps/psf/psf:\ ms=-parity,-cstopb,-clocal,-cread,crtscts,ixon,-opost: Please respond to wilensky@aaet.csc.ti.com. --Harold Wilensky