Hi there,
I am following the instructions that are listed here:
https://www.phpdocx.com/documentation/conversion-plugin/debugging-libreoffice
For step 4 I am not completely sure what I need to do to get the server to call libre office working correctly to convert my docx files into pdf files.
If I do this:
chown www-data:www-data /var/www/
It works but research leads me to believe that this is a security risk and that www-data should never be the owner of /var/www/.
I can also get the pdf conversion to work by modifyiing the phpdocx class TransformDocAdvLibreOffice(line 127) like so :
passthru('export HOME=/tmp && ' . $libreOfficePath . ' --invisible "macro:///Standard.Module1.SaveToPdfA1Toc(' . realpath($docSource) . ')" ' . $outputDebug);
Obviously I would prefer to not modify any of the phpdocx files.
Can you please help me to understand step 4 so that I can set the server up correctly.