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 ]]
38 optprinter
="$optprinter -d $4";
42 xhtml2pdf
$optpisa $i;
45 if [[ -n $optprinter ]]
47 lp $optprinter $1/*.pdf
;
50 tar cvfzP
$1`date "+%Y%m%d"`.
tar.gz
$1/*.pdf
;