Forum


Replies: 6   Views: 4179
Addtext doesnt make text bold and 20 points 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 jorge  · 16-06-2014 - 14:39

Hello, Please check and run the included examples, to get it everything is working fine. For example these code: -------------------------------------------------- //path to the CreateDocx class within your PHPDocX installation require_once '../../../classes/CreateDocx.inc'; $docx = new CreateDocx(); //A paragraph composed of two runs of text with different properties $text = array(); $text[] = array( 'text' => 'We know this looks ugly', 'underline' => 'single' ); $text[] = array( 'text' => ' but we only want to illustrate some of the functionality of the addText method.', 'bold' => true ); //we also add some borders to the paragraph to illustrate that functionality $paragraphOptions = array( 'border' => 'double', 'borderColor' => 'b70000', 'borderWidth' => 12, 'borderSpacing' => 8, 'borderTopColor' => '000000'//we overwritte the top border color property ); $docx->addText($text, $paragraphOptions); $docx->createDocx('example_addText_2'); -------------------------------------------------- generates a DOCX with some styles. Regards.