What you want to learn about is printer queues and print filters.  I am
not going to try to tell you about print queues. You really don't need
a print queue to do what you want to do, since you do not need to spool
anything to a printer.

What OS are you using? In linux, most applications send a postscript
file. Some jobs are in ascii. To convert, the following command might
work:

cat file | enscript -Z -B -o - | gs -q -sDEVICE=pdfwrite -sOutputFile=- - > 
/tmp/junk.pdf 
           
should create your pdf file for you. Mailing it is a bit tricky. I guess
you need to mail is as an attachment, no? This command, without the word
"file", would likely work just fine invoked from netscape. That is because
cat will assume input from standard input without a file name handy.

My mail program doesn't have a way to attach anything, but mutt does. So,
I would try:

echo Here is your pdf file | mutt -s Your_PDF_File -a /tmp/junk.pdf addressee

Both these command work on my machine. 

Read man gs, man enscript and man ps2pdf to get more of a flavor of your options.

Now, all of this can go into a print filter and can be invoked with a
simple lpr -Ppdf command (if you call your queue pdf). For a good basic
discussion of print filters, I suggest this site and read my basic guide
to printer filters. Search the site for hammer filters

http://linux.nf/stepbystep.html

If you eschew a black box approach, by the time you are done with this,
you will know a lot about printing.

Joel


On Fri, Jan 25, 2002 at 03:28:40PM -0800, Ron McKown wrote:
> hello everyone,
> i'm new to lprng, and have a question that i'm sure some of you could
> shed some light on.
> 
> i'm trying to setup a spool that takes a print job, converts to pdf and
> emails the .pdf file to the sender.
> 
> to be honest, i don't even know where to start.  or there might already
> be a script that someone has developed that does just that.
> otherwise, i would find it helpful if someone could just point me where
> i should start.
> 
> would this be something that would be better to do in CUPS?
> 
> Ron McKown
> [EMAIL PROTECTED]
> 
> 
> 
> 
> -----------------------------------------------------------------------------
> 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.
> -----------------------------------------------------------------------------

-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to