There is no
Java code available to create a PDF file from an HTML file, and it would be quite a task to write one (essentially you'd be duplicating an HTML renderer, only that it doesn't draw on the screen but creates PDF).
If your HTML originates from XML, you might have a chance to use FOP for this. If the HTML is generated directly by Java code, you could use iText to create both the HTML and the PDF. Both methods have drawbacks, though, and can't be used if the HTML is generated by JSP. (Links to FOP and iText are
here.)
[ December 06, 2006: Message edited by: Ulf Dittmer ]