Merge pull request #1367 from camlafit/odt2pdf

Small improves on odt2pdf script
This commit is contained in:
Laurent Destailleur 2014-01-09 06:31:35 -08:00
commit d76f54757b
2 changed files with 4 additions and 3 deletions

View File

@ -478,7 +478,8 @@ IMG;
header('Content-Disposition: attachment; filename="'.$name.'.pdf"');
readfile("$name.pdf");
}
unlink("$name.odt");
if (!empty($conf->global->MAIN_ODT_AS_PDF_DEL_SOURCE))
unlink("$name.odt");
} else {
dol_syslog(get_class($this).'::exportAsAttachedPDF $ret_val='.$retval, LOG_DEBUG);
dol_syslog(get_class($this).'::exportAsAttachedPDF $output_arr='.var_export($output_arr,true), LOG_DEBUG);
@ -555,4 +556,4 @@ IMG;
}
}
?>
?>

View File

@ -22,7 +22,7 @@ if [ -f "$1.odt" ]
nbprocess=$(pgrep -c soffice)
if [ $nbprocess -ne 1 ]
then
soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless
soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless&
retcode=$?
if [ $retcode -ne 0 ]
then