How can I add a text break or go to the next line/row while in a text run? I tried to just do $section->addTextBreak(2);
while in the text run but it just added the breaks to the section after the text run. I also tried $textrun->addTextBreak(2);
but it gave me a fatal error. Any responses would be greatly appreciated.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
The question was asked 3 years ago but I have the same problem and I found a solution. Maybe this can help new users of PHPWord.
To add a crlf in Word document the tag can help :
I found the solution here : http://jeroen.is/phpword-line-breaks/
Adding a newline in phpword has bothered me, and I finnaly found solution, by accident, so here it is: And this justifies the text.
This will output:
something
behind