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
Received on Thu Dec 12 1996 - 14:48:10 NZDT