Forum


Replies: 3   Views: 4655
Line spacing in add text: a line space of 1 sets 1 line per page?
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 larrytech  · 19-02-2015 - 21:38

The documentation for the addText method has a parameter for the line spacing. The document states that line spacing is a float where: 1 corresponds to single line spacing 2 to double line spacing and so long so forth However, when I set line spacing to 1, it puts each line on a single page? When I use a line spacing of 0.0015 it seems to use standard line spacing. How can I set the line spacing to 1.15? My code: $contentFragment->addText($line, [ 'font' => 'Trebuchet MS', 'color' => '000000', 'fontSize' => 11, 'widowControl' => true, 'lineBreak' => 'after', 'lineSpacing' => 1 ]);