1

Hi, I'm newbie in html2pdf.
when i try to make pdf file, i receive an error message like this:
-------------------------------------------
ERREUR n�4
Fichier : /home/manolo/public_html/simel/html2pdf_v3.21/parsingHTML.class.php
Ligne : 127

Code HTML non valide, les balises ne sont pas ferm�es dans le bon ordre.
Etat :

Array
(
0 =>
1 => html
2 => head
3 => meta
)
-------------------------------------------

I had try with your own examples and i get the same error.

What's happend??? I have passed my html code in W3C and Firefox HTML Validator, and NO error were found...my charset is UTF-8 (i'm spanish and my text has symbols like ~, ', etc...)


thanks in advance.

2

I don't understand it:

I'm trying with a simple HTML code:

------------------------------
$html = "<html><head><title>Hello World</title></head><body>Hola Mundo</body></html>";
// conversion HTML => PDF
require_once("html2pdf_v3.21/html2pdf.class.php");
$html2pdf = new HTML2PDF('P','A4','fr');
$html2pdf->WriteHTML($html,isset($_GET['vuehtml']));
$html2pdf->Output('exemple10.pdf');
------------------------------

And I get the following error....:

-----------------------------
ERREUR n�1
Fichier : /home/manolo/public_html/simel/html2pdf_v3.21/html2pdf.class.php
Ligne : 835

La balise <HTML> n'existe pas encore.

Si vous voulez la rajouter, vous devez cr�er les m�thodes o_HTML (pour l'ouverture) et c_HTML (pour la fermeture) en suivant le mod�le des balises existantes.

De plus, si vous cr�ez ces m�thodes, n'h�sitez pas � en faire profiter tout le monde en m'�crivant sur webmaster@spipu.net afin qu'elles se retrouvent dans la prochaine version d'HTML2PDF.
--------------------------------------

It's works? Which is the problem????

Thanks.

3

have you read the examples ? or read the readme.txt file ?
- It is very important to provide valid HTML 4.01 to the converter, but only what is in the <body>


...
Ancien pseudo : lolo

4

Is there anyway to extend those error messages with the line where the error is starting from. Like line and column number.
We did got many errors like kketzal did have too, and with a big document it is difficult to understand where the error is exactly.

Thanks anyway.
Developer of Fusion Ticket. I ticket sale webshop using Html2pdf to generate the pdf files

5

just use a HTML validator ... (like the add on "html validator" for firefox...)
Ancien pseudo : lolo

6

Hello spipu,

sorry to say, but not every one uses Firefox.
Developer of Fusion Ticket. I ticket sale webshop using Html2pdf to generate the pdf files

7

And ? It's your problem if your favorite browser doesn't provide quality developer tools... html2pdf isn't designed to replace the features you miss by choosing to use inappropriate software.
avatar
All right. Keep doing whatever it is you think you're doing.
------------------------------------------
Besoin d'aide sur le site ? Essayez par ici :)

8

Sorry, zephyr.

I don't ask to include any missing future in html2pdf, only to extend the error message with the linenumber where the system did found the problem.
Also, i'm a developer of a tool that uses html2pdf as its pdf engine. The template are not build by professionels like us. But by event organizers.

I'm totally not happy about this replay of yours.

greetings
niels
Developer of Fusion Ticket. I ticket sale webshop using Html2pdf to generate the pdf files

9

NielsNL (./8) :
only to extend the error message with the line number where the system did found the problem

It is not possible... because it don't know where it is when it found a error... first, it reads the code to separate each html tag from text and build a big array, and in second, it analyze this array to see if there is non HTML error in it.

and as it is write in the readme file :
- It is very important
to provide valid HTML 4.01 to the converter, but only what is in the <body>


HTML2PDF is not a HTML validator, and it will never be.
Ancien pseudo : lolo

10


in the next version, the HTML code affected by the error will appear!
Ancien pseudo : lolo