Forum


Replies: 3   Views: 5135
Image center alignment in table td
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 admin  · 25-09-2015 - 11:57

Hello, There's no support to align the image value as center. You can easily add support changing the HTML2WordML.inc file, and replacing this line (around 1038): if (isset($properties['float']) && ($properties['float'] == 'left' || $properties['float'] == 'right')) { by: if (isset($properties['float']) && ($properties['float'] == 'left' || $properties['float'] == 'right' || $properties['float'] == 'center')) { And this patch: --- a/lib/dompdfParser/include/styleparser.cls.php +++ b/lib/dompdfParser/include/styleparser.cls.php @@ -132,7 +132,7 @@ class StyleParser { "display" => "inline", //"elevation" => "level", //"empty_cells" => "show", - "float" => "none", + "float" => "center" Regards.