Forum


Replies: 4   Views: 3995
Text align html to 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 andrewk_777  · 24-05-2018 - 15:13

ok i figured it out. so for those who are looking for a solution on how to edit fonts for styles for $docx->replaceVariableByHTML($section, 'block', $html);

 

PHPDocx\classes\HTML2WordML.inc line 1670:

$stringRPr .= '<w:rFonts w:ascii="' . $font . '" w:hAnsi="' . $font . '" w:eastAsia="' . $font . '" w:cs="' . $font . '" /> ';

i setting up the fonts. so if you are lf you a looking for a specific font style that you use in your template:

1. rename your docx file to .zip
2. open it up and open then open word folder then open document.xml
3. fint what fonts are currently used in the current word document by finding: <w:rFonts tag and replacing it inc file or doing if statements.

anyways just a general tip. worked for me