We had a problem converting HTML documents to PDF. Unfortunately the HTML was not always formatted correctly; often times missing closing brackets etc. We looked at several solutions
that attempted to convert these malformed HTML pages to PDF with little success. Most of the solutions would simply not render the PDF or miss sections entirely.
Finally we came upon ABCpdf which had no issues converting the sloppy HTML documents to PDF while maintaining the format of the document.