I want to create a PDF (or any of the image formats [ png, jpg, bmp ..]) from the "invalid" HTML using Java . I searched for it and found a tool: iText and some of the tutorials in which iText creates a PDF file from HTML with Java.
In this (X) HTML lesson in PDF with Java , it works correctly for valid HTML, and I have a PDF file like this . But if I tried to create a PDF from my HTML, I had some errors.
First of all, my HTML is not very well formed and, unfortunately, cannot change. I downloaded it in here and the W3C validator found 28 errors .
My parameters:
- First clean and return my HTML and create a PDF soon.
- Find another tool (that works for my problem).
- Your suggestion (using Java).
- Last option; use a different platform ( .net, Php, Python , etc.) and using Webservices from my application.
Please help me in this matter. Thank you in advance
source share