TCPDF
TCPDF copied to clipboard
How can I let \n become new line in tcpdf with html
I use php and laravel to create an PDF by TCPDF. My code is like this:
...{{ $myvalue }}
... But when $myvalue has some \n, it does not wrap to new line and all words are in the same line. I change \n toor
before it render the pdf, but it display
or
without wrapping to new line.
I change \n to
What did you change \n to? Did you use HTML like <br>? That should work.
There is handy function called nl2br. Use it to convert \n to <br/>, otherwise it will not work anywhere, as it's not related to this particular package