Forum


Replies: 5   Views: 4574
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

Hi,

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

<html>
<body>
<table style='width: 100%'>
<tr>
<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>
</tr>
</table>
</body>
</html>

using:

$docx = new \CreateDocx();
$docx->embedHTML($html);

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

 

Thanks

Gianluigi

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

Hello,

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

Regards.

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

Hello,

Please write to contact[at]phpdocx.com 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:

http://www.phpdocx.com/en/forum/default/topic/1147

and that Tidy is installed and enabled on yourt server.

Regards.

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.

Thanks

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

Hello,

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

Regards.