Forum


Replies: 4   Views: 671
Customizewordcontent + embedhtml
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 rjharrison  · 18-10-2022 - 14:07

I've embedded HTML via embedHTML(). I then want to use customizeWordContent to apply transformations to the images (eg set imageAlign = 'center').

This doesn't seem to work. Is this supported?

$docx->embedHTML($html, [
  'useHTMLExtended' => true,
]);
       

// Center all images
$docx->customizeWordContent([
  'type' => 'image',
], [
  'imageAlign' => 'center'
]);