WrappingStyle/Align Image not working in a header section

Wednesday, November 4, 2015

I'm currently working with PhpWord. I added a header section, and inside it, added two images. Images need to be aligned, one left and the other right, but in the same line. And I have this code but only prints the images one below the other, only way I can change them is insde the .docx file.



$header = $section->addHeader();
$header->addImage('http://localhost/doWords/logoRenatea.jpg',
array(
'width' => '291',
'height' => '81',
'align' => 'left',
'marginTop' => -1,
'marginLeft' => -1,
'wrappingStyle' => 'behind'
));
$header->addImage('http://localhost/doWords/logoMTESS.jpg',
array(
'width' => '110',
'height' => '44',
'align' => 'right',
'marginTop' => -1,
'marginLeft' => -1,
'wrappingStyle' => 'infront'
));


Already tried without wrappingStyle, without margins, and not worked. Any ideas?



Output:



enter image description here



Desired: enter image description here

0 comments:

Post a Comment