X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FTemplate%2FHTML.pm;h=ecc3410a82ae0cf0ba317208888e8067ef85a14e;hb=47db6ae13df64092d401896ec476b9335e9ec807;hp=0ff939fd872ca5072817dc7b1b0908975f42a883;hpb=1072cd08c6f5b1905a34dcb3eeab3ddec98d6905;p=kivitendo-erp.git diff --git a/SL/Template/HTML.pm b/SL/Template/HTML.pm index 0ff939fd8..ecc3410a8 100644 --- a/SL/Template/HTML.pm +++ b/SL/Template/HTML.pm @@ -70,10 +70,11 @@ sub convert_to_postscript { $psfile .= ".ps"; } - system($::lx_office_conf{applications}->{html2ps} . " -f html2ps-config < $form->{tmpfile} > $psfile"); + if (system($::lx_office_conf{applications}->{html2ps} . " -f html2ps-config < $form->{tmpfile} > $psfile") == -1) { + die "system call to $::lx_office_conf{applications}->{html2ps} failed: $!"; + } if ($?) { - $self->{"error"} = $form->cleanup(); - $self->cleanup(); + $self->{"error"} = $form->cleanup($::lx_office_conf{applications}->{html2ps}); return 0; } @@ -103,10 +104,11 @@ sub convert_to_pdf { $pdffile .= ".pdf"; } - system($::lx_office_conf{applications}->{html2ps} . " -f html2ps-config < $form->{tmpfile} | ps2pdf - $pdffile"); + if (system($::lx_office_conf{applications}->{html2ps} . " -f html2ps-config < $form->{tmpfile} | ps2pdf - $pdffile") == -1) { + die "system call to $::lx_office_conf{applications}->{html2ps} failed: $!"; + } if ($?) { - $self->{"error"} = $form->cleanup(); - $self->cleanup(); + $self->{"error"} = $form->cleanup($::lx_office_conf{applications}->{html2ps}); return 0; }