Samba PDF Email

Dave Andruczyk djandruczyk at yahoo.com
Thu Sep 11 11:37:59 EDT 2003


You might try looking up using the MS FAX printer driver, as that prompts for
info before sending.  Donno if you can use that driver with a network printer,
but what you could try is the change the samba printer driver manually on the
windows box to use the MS fax driver, send a print job, but have the queue
stalled on linux so you can capture hte file sent and parse through it to see
if any of the data you enter is visible.    If it works you'd need to write
some scripts to extract the info out (printfilter) so it could extract the
destination name and the print job, convert the job and email it to the
intended destination...


--- Justin Bennett <justin.bennett at dynabrade.com> wrote:
> I'm creating a samba printer that will email a PDF, could be usefull for 
> emailing POs ect. I have the script and printer setup, I modified the 
> script to create a PDF from samba, and had it attach to an email and 
> send, rather than save it in a users home directory. It works fine when 
> I hard code the to address in the script. I was wondering how to pass an 
> email address to samba from windows, so I can then hand it to my script. 
> I assume I may need a custom print driver?
> 
> My Setup:
> [pdfmail]
>    path = /tmp
>    printable = yes
>    guest ok = yes
>    print command = /usr/bin/emailpdf %s %u
>    lpq command =
>    lprm command =
> 
> emailpdf:
> #!/bin/sh
> DATE=`date +%b%d-%H%M%S`
> 
> 
> OUTDIR=/tmp
> /usr/bin/ps2pdf13 /tmp/$1 $OUTDIR/$2-$DATE.pdf
> chmod 660 $OUTDIR/$2-$DATE.pdf
> sendEmail -m "Emailed PDF" -f xxx at dynabrade.com -t xxx at dynabrade.com -u 
> "Emailed PDF" -a $OUTDIR/$2-$DATE.pdf
> rm $1
> rm $OUTDIR/$2-$DATE.pdf
> 
> Justin Bennett
> Network Administrator
> RHCE (Redhat Certified Linux Engineer)
> Dynabrade, Inc.
> 8989 Sheridan Dr.
> Clarence, NY 14031
>  
> 
> 

=====
Dave J. Andruczyk

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the nflug mailing list