Forum


Replies: 4   Views: 1232
Addtext end paragraph with carrige return and i want with break paragraph
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 admin  · 18-05-2021 - 14:40

Hello,

The addText method adds a paragraph content to the document; it doesn't use a soft line break. We have tested the following code with phpdocx 6.0, phpdocx 8.2, phpdocx 9, phpdocx 10 and phpdocx 11 and we get the same output:

$docx = new CreateDocx();
$text = 'Lorem ipsum dolor sit amet.';

$docx->addText($text);
$docx->addText($text);

$docx->createDocx('output');

There's no soft line break added, only paragraph contents. Please post or send to contact[at]phpdocx.com the most simple sample that illustrates your issue; phpdocx only adds soft line breaks when requested using some option such as parseLineBreaks in template methods.

Regards.