Forum


Replies: 1   Views: 373
Justify contents with "replacevariablebyhtml"
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 Dale.Cooper  · 02-02-2024 - 16:34

Hallo!

I am using a DOCX Template to fill out a lot of placeholder-variables with HTML chucks coming from another system.

All formats I need (bold, italic, underline) get handed over correctly. However, text-align: justify is not recognized.

I am using this to insert the code:

$docx->replaceVariableByHTML('TERMSHEET_27', 'inline', $ph_termsheet_27, array('stylesReplacementType' => 'mixPlaceholderStyles'));

Using block instead of inline makes no difference.

The HTML tag used looks like this:
<span style="text-align: justify; font-family: Arial; font-size: 12px">

It's also ok for me to hard-code the justify within PHP while inserting if this is also a solution.

Thanks for any help!

Marc