I want to create PDF (or any of image formats [png, jpg, bmp..]) from an 'invalid' HTML file using Java. I googled it and find a tool: iText, and some of tutorials that using iText to create PDF from HTML with Java.
In this tutorial (X)HTML to PDF with Java , it works for a valid HTML correctly and i had a PDF file like this. But if i tried to create PDF from my HTML i had some errors.
First of all my HTML is not well formed and unfortunately does not possible to change. I uploaded it to here and W3C's validator found 28 errors.
My options are:
Please help me about this issue. Thank you in advance
You could use a tool like http://jtidy.sourceforge.net/ to fix the HTML for you and run iText against the jTidy's output...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With