From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076343421591.tru64-unix-managers.marc@archive.invalid> From: Jack Burton Date: Thu, 12 Dec 1996 13:23:49 +0000 To: tru64-unix-managers Subject: Question about lpr Print Filters X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076343421591 System Managers, I want to set up a virtual printer that takes a text file, (filename) converts it to a pdf file and stores it in a specific directory as filename.pdf. I have a text2pdf program to do the conversion. My question concerns accessing the information contained in the /usr/spool/lpd*/cf* files. How can these values be accessed via a filter program? For instance, I would like to access the filename of the print job from the filter program. The "J" parameter or "N" parameter would have to be passed. Is it? My printcap looks like: pdf|lp13:\ :af=/usr/adm/lp13acct:\ :if=/usr/local/filters/pdf:\ :lf=/usr/adm/lp13err:\ :lp=/dev/null:\ :mx#0:\ :pl#66:\ :pw#80:\ :sd=/usr/spool/lpd13:\ :xf=/usr/lbin/xf: The filter /usr/local/filters/pdf isn't yet complete. I need to redirect the output of text2pdf to a uniq filename other than file.pid. #!/bin/sh cat - | /usr/local/bin/text2pdf -------------------------------------------------------------------------- If I send "file1" to the printer pdf I want the file "file1.pdf" to be created. TIA Jack