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.
Hi,
We're normalizing the measures of all methods for the next release. So the easiest choice is that you do a minor change in the library.
Please open the CreateDocx.inc class and comment or remove this line (around line 5433):
$options['lineSpacing'] = ceil($options['lineSpacing'] * 240);
And set the lineSpacing in twips. For example to set it as 1.5:
$text = 'Lorem ipsum dolor';
$paragraphOptions = array(
'bold' => true,
'font' => 'Arial',
'lineSpacing' => 480
);
$docx->addText($text, $paragraphOptions);
360 is the value 1. So you can change it to fit your needs.