PDF writer

HOME
Red Hat 7.2
Laser5 7.2
GUI setting
Other OS
LAN
sendmail
pop, imap
fml (ML)
apache
samba
web browser
namazu
PDF writer
printer
CD-ROM
cron
Problems

 

まずディレクトリを作成

 
# cd /var/samba
# mkdir bin
# mkdir pdfout
# mkdir pdfwork
# chmod 777 pdfout pdfwork

 

/etc/samba/smb.conf
[pdfwriter]
printable = yes
comment = PDF Writer
print command = /var/samba/bin/pdfwriter %s &
guest ok = yes
path = /var/samba/pdfwork

[pdfout]
comment = PDF Output
path = /var/samba/pdfout
guest ok = yes
read only = no
writable = yes

 

/var/samba/bin/pdfwriter
#!/bin/sh
#
# pdfwriter <ps file> <client>
#
outdir=/var/samba/pdfout
workdir=/var/samba/pdfwork
psname=$1
client=$2
pdfname=${workdir}/${client}.${psname}.pdf
msgname=${workdir}/${client}.${psname}.log
#
echo User : ${client} > $msgname
echo File : ${psname} >> $msgname
/usr/bin/ps2pdf $psname $pdfname >> $msgname
mv $psname $pdfname $msgname $outdir
#
# echo PDF FILE Created : `$pdfname` >> $msgname
# cat $msgname | /usr/bin/smbclient -M $client
# rm -f $psname $msgname

# chmod 755 pdfwriter