Does anyone know why this works great with phpCLI but fails with apache?
$cmd = "soffice --headless --nofirststartwizard -convert-to pdf:writer_pdf_Export file.doc -outdir converted/";
exec($cmd, $dump, $ret);
I was struggling with this few more hours, but finally I've found solution here http://geekswithblogs.net/robertphyatt/archive/2011/11/19/converting-.docx-to-pdf-or-.doc-to-pdf-or-.doc.aspx
I hope this can help someone else
Try use "export HOME=/tmp" before run OpenOffice.
Example:
export HOME=/tmp
soffice --headless --convert-to pdf --outdir /var/www/public/uploads/ /var/www/public/uploads/artcl.ppt
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.