Bug 39208: Remove xhtml2pdf from printoverdues.sh
Note: this requires a command line access to the test machine
TEST PLAN:
1 - Anywhere on the computer running koha, run following command:
mkdir tmp
echo '<!DOCTYPE html><html><head><meta charset="UTF-8"></head><body><p>Тетрис — это классика!</p></body></html>' > tmp/tmp.html
echo '* { color: red };' > tmp.css
./misc/cronjobs/printoverdues.sh tmp tmp.css
2 - Open the pdf in tmp/tmp.pdf, notice it is broken
3 - Apply patch
4 - Rerun ./misc/cronjobs/printoverdues.sh tmp tmp.css
5 - Open the pdf in tmp/tmp.pdf, notice it is now displaying properly, notice the css property still applies
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
76e719964c
commit
abd436ecf6
|
|
@ -9,10 +9,7 @@ print_usage(){
|
|||
echo " - printer_host Network Name or IP of the printer (port possibly included) ";
|
||||
echo " - printer_name printername ";
|
||||
echo "Note that css printerhost and printername are optional parameters ";
|
||||
echo "Note that this script uses xhtml2pdf command ";
|
||||
echo " xhtml2pdf command comes with pisa (a python library)
|
||||
To install you need setuptools library for python
|
||||
then type easy_install pisa ";
|
||||
echo "Note that this script uses weasyprint command ";
|
||||
|
||||
exit 1;
|
||||
}
|
||||
|
|
@ -27,7 +24,7 @@ then
|
|||
fi
|
||||
if [[ -n $2 && -f $2 ]]
|
||||
then
|
||||
optpisa="--css $2";
|
||||
cssopt="-s $2";
|
||||
fi
|
||||
if [[ -n $3 ]]
|
||||
then
|
||||
|
|
@ -37,9 +34,11 @@ if [[ -n $4 ]]
|
|||
then
|
||||
optprinter="$optprinter -d $4";
|
||||
fi
|
||||
for i in $1/*.html
|
||||
|
||||
for i in $(ls $1/*.html 2>/dev/null)
|
||||
do
|
||||
xhtml2pdf $optpisa $i;
|
||||
outputfile=$(echo $i | sed 's/\.html/.pdf/')
|
||||
weasyprint $cssopt $i $outputfile;
|
||||
done
|
||||
|
||||
if [[ -n $optprinter ]]
|
||||
|
|
|
|||
Loading…
Reference in New Issue