I searched the web how to convert an HTML page to a PDF using Java. I found a lot of pointers and, in short, they do not work or they are too difficult to implement. I also downloaded a commercial product, pdf4ml; The API is something that I would be happy to work with, except that when I look at a simple page in wikipedia, I get an error from memory (setting Xmx to 1024 M). in some approaches, they suggest converting HTML β XHTML β FO β PDF. however, I get many exceptions for the XHTML-to-FO XLS file; and reading documentation, itβs not that I have enough time to understand right now.
here are my questions / concerns. 1. Is there another cohesive API that easily converts HTML to PDF (commercial or not)? 2. There is a way that I can just grab the HTML page and save it as a single file. Will this approach be similar to using Internet Explorer to save a web page as a web archive (single file, MHT format)?
any help is appreciated. (By the way, I know that this question has been asked repeatedly, but in addition to the original spirit of the question, I am open to other ways). thanks.
source share