Print to PDF -> Email

Tertius tmcarstens at gmail.com
Tue Dec 16 10:13:10 PST 2008


One last question.

The documentation says to put "tea4cups://" in front of the printer queue name.

Would it then look like this : "tea4cups://cups-pdf:/"

Thanks,
T

> On Fri, Dec 05, 2008 at 01:40:14PM -0800, Tertius wrote:
> >
> >
> > Found it, playing with it, can't read the pdftomail.sh, how do I just
> >  make it send all pdfs (that's sent to the pdf printer) to one email
> >  address?
>
> The original script :
>
> --- CUT ---
> #! /bin/sh
> if [ -z "$USEREMAIL" ] ; then
>   USEREMAIL=`grep "^$TEACLIENTHOST" /etc/cups/ipemail | cut -f 2,2 -d :`
>   ;
> fi
> if [ -n "$USEREMAIL" ] ; then
>   PDFFILE="/tmp/$TEAUSERNAME-$TEAJOBID.pdf"
>   ps2pdf - <"$TEADATAFILE" >"$PDFFILE" \
>   && mpack -c application/pdf \
>            -s "Fichier PDF $TEAUSERNAME (#$TEAJOBID)" \
>            "$PDFFILE" \
>            "$USEREMAIL" \
>   && rm -f "/tmp/$TEAUSERNAME-$TEAJOBID.pdf" ;
> fi
> --- CUT ---
>
> >From there it's clear that if the USEREMAIL environment variable is
> present when the script is launched, this email address is the one that
> will be used.
>
> So either modify your tea4cups.conf to set this environment variable at
> the start of the command line which launches the above script (not sure
> if this will work), or simply put "USEREMAIL=you at example.com" on the
> second line of the script above, and you're done.
>
> You can also remove the 'ipmail' text file, since you don't need to
> match client IP addresses to user email address.
>
> bye
>
> Jerome Alet
>
>





More information about the cups mailing list