Forum


Replies: 1   Views: 2437
Problem when i try to convert a docx to pdf in cleantemp.inc on line 47
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 deciphercredit  · 11-01-2018 - 18:10

Hi Guys.

I try to convert a file a docx to pdf like this:
$docx = new \Phpdocx\Transform\TransformDocAdvOpenOffice();
$docx->transformDocument(public_path().'/file.docx','test.pdf',public_path());

and i have this problem:
PHP Warning:  opendir(/home/server/project/public/tempOdt_5a57a6d89123c.odt): failed to open dir: No such file or directory in /home/server/project/vendor/phpdocx/Classes/Phpdocx/Clean/CleanTemp.inc on line 47

I use openoffice.
 

Thanks!

Posted by admin  · 11-01-2018 - 18:36

Hello,

We think the warning appears because the ODT can't be generated. Maybe there's some missing rw access to the target or .wapi folder.

We recommend you to follow the debug steps available on https://www.phpdocx.com/documentation/conversion-plugin/debugging-openoffice, to know the exact problem.

We also recommend you to use the conversion plugin based on LibreOffice instead of the OpenOffice one. The conversion plugin based on LibreOffice is the recommended one since phpdocx 4.5 to get the best output; on https://www.phpdocx.com/documentation/conversion-plugin you can read all information about the conversion plugin and the steps to install and configure it.

Regards.