Forum


Replies: 2   Views: 696
Docx rtl generation from file template
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 s.montanarella  · 06-10-2022 - 13:20

Hi',

we have an issue trying to generate a RTL docx starting from a template injecting html with replaceVariableByHTML.
The LTR file is perfect.

With RTL (HTML "dir" attribute) the resulting docx file does not display correctly preset paragraph styles like "Normal", "Heading 1", etc...

Example: I've set "Heading 1" as "family: Calibri, size: 15". When I open the resulting doc font is changed in Arial 26; same thing for all other styles.

Is it possibile to use the same template for LTR and RTL documents?
We have already tried to set Bidi and Rtl parameters but, in this case, we have an error:
Fatal error: Uncaught Error: Call to a member function createElement() on null in /usr/src/docxConverter/libraries/phpdocx-premium-11.0/classes/CreateDocx.php:8790`

Thank you in advance,
Federico Filippi