Replies: 5   Views: 4608
Width attribute on td element of an html table is ignored
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 cocciagialla  · 29-02-2016 - 08:34


I am trying to create a docx from an $html like this:

<table style='width: 100%'>
<td style='width: 40px; max-width: 40px;'>A</td>
<td style='width: 80px; max-width: 80px;'>BBB</td>
<td style='width: 80px; max-width: 80px;'>CCC</td>


$docx = new \CreateDocx();

but the resulting table on the docx has all the columns of the same width.




Posted by admin  · 29-02-2016 - 08:36


What version and license of phpdocx are you using? And what program and version are you using to open it?


Posted by cocciagialla  · 29-02-2016 - 09:18

Pro license, version 5.1.

I am using libreoffice 4.2

Posted by admin  · 29-02-2016 - 09:34


Please write to contact[at] and in the body of the message send the email or username of the user that owns the license, your user doesn't have a license tied.

Also check this topic, maybe your issue is the same:

and that Tidy is installed and enabled on yourt server.


Posted by cocciagialla  · 29-02-2016 - 14:57

I checked the other post but it didn't work for me. I wrote you an email.


Posted by admin  · 01-03-2016 - 07:44


MS Word opens the document perfectly, we have sent you a new class that improves the support for LibreOffice.