tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Jack Burton <jackb () pgw ! picker ! com>
To: tru64-unix-managers
Subject: Question about lpr Print Filters
Date: Thu, 12 Dec 1996 13:23:49 +0000	[thread overview]
Message-ID: <96076343421591.tru64-unix-managers.marc@archive.invalid> (raw)

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

                 reply	other threads:[~1996-12-12 13:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox