Reputation: 53
I want to display the text in separate lines when generate PDF using DomPDF.
I have tried: {{ nl2br($text) }} and {{ nl2br(e($text)) }}, but not working.
{{ $text }}
Current result:
This is the first line. This is the second line. This is the third line.
Expected result:
This is the first line.
This is the second line.
This is the thid line.
Upvotes: 0
Views: 4541
Reputation: 146
While generating the text for your pdf, after every statement, add <br>
or <br/>
.
I think this will fullfill your need.
Upvotes: 3