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.
I'v been struggling with getting html tables styled so that I could control their width. Both the whole table tag but also just set the individual rows. Is this not possible with phpdocx_pro?
All the html is fine.
I should mention that I'm viewing the docx's in Microsoft Word 2008 on a mac
$html = '<table style="border-style: solid; width: 400px;">';
$html .= '<tr>';
$html .= '<td>first</td>';
$html .= '<td>second</td>';
$html .= '</tr>';
$html .= '</table>';
$docx->embedHTML($html);
Hello,
Please try embedHTML method that transforms HTML to WordML.
Regards.
Thanks for the reply!
Isn't that what I'm already using?
$html = ‘<table style=”border-style: solid; width: 400px;”>’;
$html .= ‘<tr>’;
$html .= ‘<td>first</td>’;
$html .= ‘<td>second</td>’;
$html .= ‘</tr>’;
$html .= ‘</table>’;
HERE:
[b]$docx->embedHTML($html);[/b]
Hi,
Sorry, I meant addHTML.
Regards.
I then get an error when I open it in Word, saying the file is damaged and can't be opened?