0

i'm using barryvdh/laravel-dompdf laravel package for pdfs. In the pdf page (coded in html) when the text is more than one line and the line breaks inside the table cell the second line does not start from the left, it starts somewhere close to the middle. weirdly when i tried to align the text to the right this problem does not happen (even though my text is in english)(https://i.stack.imgur.com/kybgx.png)

i think i have a problem in the configuration (i'm new to this)

This is the first line in my controller: Pdf::setOption(['dpi' => 150, 'defaultFont' => 'sans-serif']);

And this is the code from the top of the pdf html page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <link rel="stylesheet" href="assets/css/pdf-style.css"> <title>Table</title> </head>

peuf
  • 1
  • ... is your css using tailwind ? ... if so, see [this info](https://laracasts.com/discuss/channels/laravel/generate-a-pdf-with-css-styles) – Paul T. Jul 20 '23 at 02:04
  • @PaulT. thank you, but it's not the same problem i'm only using simple css (its just a white page with a table in it) – peuf Jul 20 '23 at 08:21

0 Answers0