Replies: 1   Views: 2669
Font size of docx
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 michealorion  · 11-07-2017 - 09:59


I'm creating a docx from a template by doing html transformations.Is there a way to set a font size for the whole document?



Posted by admin  · 11-07-2017 - 10:11


UPDATE: You can set set the font size in each method (such as the fontSize option in addText), set the default size in the template or use the setDocumentDefaultStyles method.

When importing HTML a default font size is applied. Custom font sizes can be applied using CSS styles.