Forum


Replies: 7   Views: 4397
Transformdocument and image
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 bdeblais  · 04-05-2015 - 10:55

Hi, I use embedHTML method to create DOCX. HTML content image tag like It's no problem when I open the DOCX : the image is insert into the document. I have a problem when using the method "transformDocument" with the DOCX generated : the images are not in the final document (PDF or ODT). (There is no error in the log file) Thank you in advance for your reply. nb.: I use Corporate 4.5

Posted by admin  · 04-05-2015 - 13:55

Hello, Which plugin conversion are you using? LibreOffice or OpenOffice? Of this program, what version is installed on your server? Regards.

Posted by bdeblais  · 04-05-2015 - 14:15

Thanks for your quick reply. "soffice --version" give me "LibreOffice 3.5" Note that when I use "transformDocument" on a 'native' DOCX (not generated by embedHTML), it's no problem. Regards.

Posted by admin  · 04-05-2015 - 14:19

Hello, Please upgrade to LibreOffice 4.3 or newest; previous versions has very limited support for DOCX documents. We recommend you to read this page: http://www.phpdocx.com/documentation/conversion-plugin/conversion-plugin-installation-and-set-up After this upgrade please try again the transformation. Regards.

Posted by bdeblais  · 04-05-2015 - 14:48

Ok. I use Ubuntu Server 12.04 and my config in phpdocxconfig.ini is : [transform] method = "openoffice" path = "/usr/lib/libreoffice/program/soffice" The "transformDocument" works fine with documents created with "embedHTML" method without image or with 'native' DOCX with image (DOCX from Microsoft Word).

Posted by admin  · 04-05-2015 - 14:59

Hello, If you're using LibreOffice, you can't set the method as openoffice. Please change the config to: method = "libreoffice" and upgrade to LibreOffice 4.3 or newest and try again. The documents created with embedHtml work perfectly when transforming to PDF using the latest version of OpenOffice and LibreOffice. Regards.

Posted by bdeblais  · 05-05-2015 - 10:16

Hello, I updated LibreOffice to version 4.3 and modified configuration file: everything works! So thanks for your help. Nevertheless, I noticed a little problem when I use a temporary directory $docx->transformDocument('/tmp/mydoc.docx', '/tmp/mydoc.pdf',null, array('debug' => true)); I have the following error message: No such file or directory in TransformDocAdvLibreOffice.inc on line 78 Regards.

Posted by admin  · 05-05-2015 - 14:21

Hello, Please send an email to contact[at]phpdocx.com. Regards.