Merge pull request #8201 from BitKFu/develop
Export to PDF using LibreOffice 5 command line
This commit is contained in:
commit
c022b082d5
@ -581,18 +581,10 @@ IMG;
|
|||||||
// Export to PDF using LibreOffice
|
// Export to PDF using LibreOffice
|
||||||
if ($conf->global->MAIN_ODT_AS_PDF == 'libreoffice')
|
if ($conf->global->MAIN_ODT_AS_PDF == 'libreoffice')
|
||||||
{
|
{
|
||||||
// Executing convert to PDF using libreoffice 5
|
// using windows libreoffice that must be in path
|
||||||
if (isset($_SERVER["WINDIR"]))
|
// using linux/mac libreoffice that must be in path
|
||||||
{
|
// Note PHP Config "fastcgi.impersonate=0" must set to 0 - Default is 1
|
||||||
// using windows libreoffice that must be in path
|
$command ='soffice -headless -convert-to pdf -outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name);
|
||||||
// Note PHP Config "fastcgi.impersonate=0" must set to 0 - Default is 1
|
|
||||||
$command ='soffice.exe -headless -convert-to pdf -outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// using linux/mac libreoffice that must be in path
|
|
||||||
$command ='soffice -headless -convert-to pdf -outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
elseif (preg_match('/unoconv/', $conf->global->MAIN_ODT_AS_PDF))
|
elseif (preg_match('/unoconv/', $conf->global->MAIN_ODT_AS_PDF))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user