Forum


Replies: 9   Views: 336
How to reduce space between one line break
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 fairshareitservices  · 30-07-2024 - 10:08

$docx->addText('', array('fontSize' => 6, 'font' => 'Arial', 'spacingBottom' => 4, 'spacingTop' => 4)); is not working as expected. 

$breakFragment = new WordFragment($docx);
$breakFragment->addBreak();

$runs = array();
$runs[] = array('text' => 'Content 1');
$runs[] = array('text' => ' ', 'fontSize' => 6, 'font' => 'Arial');
$runs[] = $breakFragment;
$runs[] = array('text' => 'Content 2');

$docx->addText($runs);
Also adds Microsoft Sanserif 11 font size. So how to reduce this size?