Forum


Replies: 1   Views: 741
Transformdocument
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 Tiago Scalco de Mello  · 29-03-2017 - 03:10

 

I am having the following error when I run the sample1.php in transformDocument

Warning: rename(./test.pdf,test .pdf): The system can not find the file specified. (code: 2) in C:\wamp64\www\phpdocx\Classes\Phpdocx\Transform\TransformDocAdvLibreOffice.inc on line 139

phpdocxconfig 

;libreoffice or openoffice
method = "libreoffice"

; libreoffice installation path, absolute path
path = "C:\Program Files\LibreOffice 5\program\soffice.exe"

 

From the command line I can convert

C:\Program Files\LibreOffice 5\program\soffice.exe --headless --convert-to pdf --outdir "C:\temp" "C:\temp\test.docx"

 

Posted by admin  · 29-03-2017 - 05:54

Edited by admin · 29-03-2017 - 15:36

Hello,

As the path to LibreOffice include blank spaces, please wrap it with single quotes:

path = "'C:\Program Files (x86)\LibreOffice 5\program\soffice.exe"'
 
We also recommend you to follow the steps explained on:
 
https://www.phpdocx.com/documentation/conversion-plugin/debugging-libreoffice
 
to debug it. Maybe there's some rw access to the target folder.
 
Regards.