Answer the question
In order to leave comments, you need to log in
Why doesn't TCPDF output a table from a variable with HTML?
For PDF generation I use TCPDF class. I ran into a problem, I display a table from a variable in which I collect data through foreach, but the table is not displayed in pdf. Further, I output the data with the variable (the generated HTML table) to the browser via echo, ctrl + u copy what the server directly gave. I add HTML to the $tbl variable as a string. I substitute this variable for the previous one. And Everything works... Just in the TCPDF examples All HTML that was output via the writeHTML method was previously described in a string variable. Maybe there are some nuances?
I tried converting to UTF-8 before output, but it didn't work.
$tbl=utf8_encode($tbl);
$pdf->writeHTML( $tbl , true, false, false, false, '');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question