Forum


Replies: 1   Views: 3516
Bug in transformdocadvlibreoffice
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by xlembo@eliberty.fr  · 12-06-2015 - 20:58

Hi, there are 2 bugs in LibreOffice PDF class: TransformDocAdvLibreOffice First one always echo debug message on MacOS during output : ( for exemple: ) convert /Users/me/Workspace/docrest/storage/converted/myfile557b4567703fa.docx -> /Users/me/Workspace/docrest/storage/converted/myfile557b4567703fa.pdf using filter : writer_pdf_Export Fixing with adding Darwin PHP_OS does the trick, Second complains about an undefined variable $outdir Here is a diff for patching , please Index: library/phpdocx/Classes/Phpdocx/Transform/TransformDocAdvLibreOffice.inc IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- library/phpdocx/Classes/Phpdocx/Transform/TransformDocAdvLibreOffice.inc (revision ) +++ library/phpdocx/Classes/Phpdocx/Transform/TransformDocAdvLibreOffice.inc (revision ) @@ -70,7 +70,7 @@ // set outputstring for debugging $outputDebug = ''; - if (PHP_OS == 'Linux') { + if (PHP_OS == 'Linux' || PHP_OS == 'Darwin') { if (!$options['debug']) { $outputDebug = ' > /dev/null 2>&1'; } @@ -80,9 +80,10 @@ } } + // if the outdir option is set use it as target path, instead use the dir path - if (isset($options[$outdir])) { - $outdir = $options[$outdir]; + if (isset($options['outdir'])) { + $outdir = $options['outdir']; } else { $outdir = $sourceFileInfo['dirname']; }

Posted by admin  · 13-06-2015 - 09:12

Hello, Thanks for the warning, we're fixing the issue of $oudir key that must be the string 'outdir' instead of a variable. About the debug info output on Mac, we've added your new conditional. This week we'll upload a new package that adds it and for FreeBSD. Regards.