Forum


Replies: 2   Views: 3297
Embedded html : how to inherit the font size and family of a template document?
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 Bouillou  · 01-11-2017 - 09:06

Hi,

I am using PHPDocx Corporate license. 

Is it possible to embed HTML content with the method replaceVariableByHTML and inherit the font-size and font-family used in the Word template?

For example, I start by creating a new object with CreateDocxFromTemplate. This template has a special font and font-size defined for the whole document. Let's take "Font-size 55" and "Font-family Algerian" for this example.

I would like that the embedded HTML inherits of these font-size and font-family. How can I do that?

I tried to add a wrapping DIV with "font-family: inherit; font-size: inherit" but unfortunately it is not working.

Best regards,

S├ębastien