Use a better temp directory
This commit is contained in:
parent
69344a7170
commit
23c0a30263
@ -821,12 +821,13 @@ IMG;
|
||||
if ($conf->global->MAIN_ODT_AS_PDF == 'libreoffice')
|
||||
{
|
||||
dol_mkdir($conf->user->dir_temp); // We must be sure the directory exists and is writable
|
||||
dol_mkdir($conf->user->dir_temp.'/odtaspdf'); // We create a subdir because the soffice change pemrissions on it
|
||||
|
||||
// Install prerequisites: apt install soffice libreoffice-common libreoffice-writer
|
||||
// using windows libreoffice that must be in path
|
||||
// using linux/mac libreoffice that must be in path
|
||||
// Note PHP Config "fastcgi.impersonate=0" must set to 0 - Default is 1
|
||||
$command ='soffice --headless -env:UserInstallation=file:\''.$conf->user->dir_temp.'\' --convert-to pdf --outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name);
|
||||
$command ='soffice --headless -env:UserInstallation=file:\''.$conf->user->dir_temp.'/odtaspdf\' --convert-to pdf --outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name);
|
||||
}
|
||||
elseif (preg_match('/unoconv/', $conf->global->MAIN_ODT_AS_PDF))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user