4 echo "$0 : generates PDF files from html files in directorys and prints them";
6 echo "$0 directory [css [printer_host [printername]]]"
7 echo " - directory directory to use to apply html2pdf transform";
8 echo " - css css file to apply to html ";
9 echo " - printer_host Network Name or IP of the printer (port possibly included) ";
10 echo " - printer_name printername ";
11 echo "Note that css printerhost and printername are optional parameters ";
12 echo "Note that this script uses xhtml2pdf command ";
13 echo " xhtml2pdf command comes with pisa (a python library)
14 To install you need setuptools library for python
15 then type easy_install pisa ";
25 echo "$1 : directory expected";
28 if [[ -n $2 && -f $2 ]]
30 set $optpisa "--css $2";
34 set $optprinter "-h $3";
38 set $optprinter "$optprinter -d $4";
44 lp $optprinter $1/*.pdf
45 tar cvfz $directory`date "+%Y%m%d"`.tar.gz $directory