X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/a99b261f6a4a4b1988ce2e0ad4c27ed579378cb9..06e79bf0f4ad9d5499f4435d2158d8a064034a8f:/SL/Template/HTML.pm 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; }