Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I let \n become new line in tcpdf with html #760

Open
gangli66 opened this issue Nov 1, 2024 · 1 comment
Open

How can I let \n become new line in tcpdf with html #760

gangli66 opened this issue Nov 1, 2024 · 1 comment

Comments

@gangli66
Copy link

gangli66 commented Nov 1, 2024

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 to
or
before it render the pdf, but it display
or
without wrapping to new line.
@littlepackage
Copy link
Contributor

I change \n to

What did you change \n to? Did you use HTML like <br>? That should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants