Forum


Replies: 3   Views: 3713
Conversion .docx to .odt, issues with tables
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 LegalProjekt  · 08-02-2015 - 09:30

Hello, I'm using the 3.7 PRO+ version, because I believe I can't upgrade to 4.0 without paying again. Anyway to the problem. While converting my .docx document to .odt all the tables I generated with html break up. When I inspected the tables in OpenOffice I noticed they have the "left spacing" attribute set to a negative value, for no reason and that's what breaks up the table. The tables work perfect in .docx and there are no issues there. The problem only occurs if you open the .docx in OpenOffice and/or if you convert it to .odt. The tables are being generated with $docx->replaceTemplateVariableByHTML(), while the document conversion is done with $docx->transformDocx($source, $destination, null, array('odfconverter' => false)). The table: <table width="80%" style="font-weight:bold;font-size:10pt;border:1px solid black; border-collapse:collapse;">...</table> NOTE: This only happens to the tables that were generated with HTML, the tables that were in the template work fine. Am I missing an attribute? Is there any solution to this?

Posted by admin  · 09-02-2015 - 07:29

Hello, You need to enable OdfConverter to get the best output, and you need to set manually in each td the styles you want to use. Regards.

Posted by LegalProjekt  · 09-02-2015 - 16:39

The problem that I have with OdfConverter is that when I enable it there is no output, the script finishes but there is no .odt file. Is there a way to debug this?