edit this article
Written by torgrimt@sysrq.no

You will need to have a working install of samba. For windows you can use the apple laser printers drivers. Use one that has colors and high resolution.

Remeber to credit me if you use this. thanks torgrimt at sysrq.no/

Put this in smb.conf

     comment = PDF Generator
     path = /var/spool/samba
     printable = Yes
     print command = /usr/sbin/pdfprint %s %U %G %m %I %H

And the script to convert the files to pdf... You will have to make the dir spesified in OUTPUTPATH in the users homedir.

   #convert to pdf
   #$1=spool file $2=uid $3=gid   $4=machinename $5=ip $6=homedir
   FILENAME=pdf-$2-`date +%d%m%H%M%S`.pdf
   echo converting $1 to $FILENAME for $2 of machine $4... $6>>
   /usr/bin/ps2pdf $1 $OUTPUTPATH/$FILENAME >> $OUTPUTPATH/pdfcreate.log 2>> $OUTPUTPATH/pdfcreate.log
   echo conversion finished, removing $1 >> $OUTPUTPATH/pdfcreate.log
   rm $1
   echo done, setting permissions and notifing user >> $OUTPUTPATH/pdfcreate.log
   chown $2:$3 $6/$FILENAME >> $OUTPUTPATH/pdfcreate.log
   chmod 700 $6/$FILENAME >> $OUTPUTPATH/pdfcreate.log
   echo your new PDF is called $FILENAME. | smbclient -M $4 -I $5
   echo All done. >> $OUTPUTPATH/pdfcreate.log
   echo >> $OUTPUTPATH/pdfcreate.log

rate this article:
current rating: average rating: 1.2 (70 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)