Hey, I've been trying to generate a pdf file using html2pdf library (http://html2pdf.fr/en/example). What I need to do is to print a table with PHP in that pdf file, so I stored the table in a variable called $contain with all html tags. My code goes this way:
1) It brings the information from the database with MySQL
2) It stores that information on a variable called $contain
$contain also contains html tags. So I can't find out what's wrong, the error is...
"Fatal error: Uncaught <span style="color: #AA0000; font-weight: bold;">ERREUR n°4</span><br>Fichier : D:\Web Design\EasyPHP-5.3.9\www\Tecni-RA\catalogopdf\html2pdf_class\parsingHtml.class.php<br>Ligne : 119<br><br>Code HTML non valide, les balises ne sont pas fermées dans le bon ordre.<br>Etat : <pre>Array ( [0] => page [1] => div [2] => table ) </pre><br><br>HTML : ...UE DISTRIBUIDOR X 10&lt;/caption&gt;&lt;/tbody&gt;&lt;tbody&gt;&lt;tr id='tablafoto'&gt;&lt;td&gt;&lt;i... thrown in D:\Web Design\EasyPHP-5.3.9\www\Tecni-RA\catalogopdf\html2pdf_class\parsingHtml.class.php on line 119"
Please if you could give me a piece of advice I'll apreciate it because I'm going crazy.

5 Years
Discussion Span
Last Post by chrishea

html2PDF generally works well, except when your html isn't completely valid (ie when you've taken a short cut with closing tags missing). That is what "les balises ne sont pas fermes" means (ie tags are not closed). Go through the html and add closing tags where they are missing and it should work ok.

les balises ne sont pas ferm

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.