---------------------------------------------------
#!/bin/bash
#
# Simple script using ps2pdf to allow samba users to create pdf files
# invoke from samba print command = {this file} %s %U
# Requires ps2pdf and mail# PDF will be saved directly to a samba share # $OUTDIR is the linux path to the final saved file directory # $SAMBADIR is the unc path windows users will use to get to the directory # $FINALFILE is the name of the file # - as long as a user does not make more than 1 pdf per second, this name # should be ok # $MYDOMAIN is the email domain to send the link
PSFILE=$1 USER=$2 COMPUTER=$3 IP=$4 DATE=`date +%H%M%S-%d%m%y` OUTDIR=/data1/general/pdfs SAMBADIR="\\\dataserver\general\pdfs" FINALFILE=$USER-$DATE.pdf MAILDOMAIN="mydomain.com"
ps2pdf $PSFILE $OUTDIR/$DATE-$USER.temp
mv $OUTDIR/$DATE-$USER.temp $OUTDIR/$FINALFILE
chmod 700 $OUTDIR/$FINALFILE
rm $PSFILE
echo Hi $USER, you printed a file from $COMPUTER $IP, the PDF version of the file is located here: $SAMBADIR\\$FINALFILE. | mail -s "Your PDF" -r [EMAIL PROTECTED] [EMAIL PROTECTED]
----------------------------------------------
Stefan G. Weichinger wrote:
Hello,
Mittwoch, 26. Mai 2004, 03:48 you wrote:
GJC> -----BEGIN PGP SIGNED MESSAGE----- GJC> Hash: SHA1
GJC> Peter Rundle wrote: GJC> | In the past I've set up a pdf creation utility for windows users based GJC> | on the info from GJC> | GJC> | http://www.linuxgazette.com/issue72/bright.html
GJC> Use Samba 3.0.3 or later and set 'printing = bsd' in GJC> that share only.
BTW, has anyone a more comfortable solution that allows the win-user to "Save as ..." the created pdf?
-- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
