Forum


Replies: 1   Views: 2384
Center image using replacevariablebywordfragment
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  · 29-04-2018 - 08:12

Hello,

Yes, you can set image properties when using replaceVariableByWordFragment. You need to set float and imageAlign properties as center and use a not inline textWrap with addImage. Also please set target as block with replaceVariableByWordFragment to overwrite the default align of the paragraph.

About replacePlaceholderByImage, we have done some tests and everything is working correctly. Please run the example included in the package (examples/Templates/replacePlaceholderByImage) and check it. If you still are unable to use the method, please send to contact[at]phpdocx.com your template and we'll check if the placeholder has been added correctly.

Regards.