Forum


Replies: 2   Views: 3728
Replacevariablebyhtml doesn't use $variable$ font & fontsize
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 smartbit  · 29-04-2015 - 10:28

also tried replaceVariableByWordFragment with the same result, font Verdana, 10pt is replaced with Cambria, 12pt. $valuesTable = array( array(11, 12, 13, 14), array(21, 22, 23, 24), array(31, 32, 33, 34), ); $paramsTable = array( 'border' => 'single', 'borderWidth' => 10, 'borderColor' => 'B70000', ); $table = new \Phpdocx\Elements\WordFragment($docx); $table->addTable($valuesTable, $paramsTable); $docx->replaceVariableByWordFragment(['codestabel' => $table], ['type' => 'block']);