YaHP is a Java library that allows you to convert an HTML document into a PDF document.