Forum


Replies: 5   Views: 6692
Pdf conversion
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 dealcloser  · 10-04-2017 - 14:21

I have LibreOffice working, but the phpdocx conversion still fails.

I can successfully convert a file using the LibreOffice utility:

$ /opt/libreoffice5.3/program/soffice --invisible --convert-to pdf SampleAgreement.docx 
convert SampleAgreement.docx -> SampleAgreement.pdf using filter : writer_pdf_Export

I updated config/phpdocxconfig.ini as follows:

; libreoffice or openoffice
method = "libreoffice"

; libreoffice installation path, absolute path
path = "/opt/libreoffice5.3/program/soffice"

I ran the test conversion again (outside of Laravel)

$ php test.php 
[INFO][phpdocx/tempDocX_58eb92c13f92d.docx] Converting tempDocX_58eb92c13f92d.docx into tempOdt_58eb92c140673.odt
progress:w:progress:w:t[INFO][phpdocx/tempDocX_58eb92c13f92d.docx] Conversion succeeded
[INFO][phpdocx/tempDocX_58eb92c13f92d.docx] Total conversion time: 00:00:00.7249124
Done.
ERROR: connection failed. Please make sure OpenOffice.org is running and listening on port 8100.

Although it says the conversion succeeded, there is no PDF file output. It also says it's looking for OpenOffice running, but I have configured LibreOffice in the config file as above.