Java - Converting Html With Images In Css To Pdf
Solution 1:
one lame way (but hey you may be desperate) is there is a java library for contacting openoffice running as a headless server. This is http://www.artofsolving.com/opensource/jodconverter ... and use openoffice to convert. OTOH, this is pretty kludgy, and definitely not pure java) and I'm not sure how good the openoffice html import filter is ... but I guess it's worth looking at. There used to be some html to pdf converters built into iText but they have been removed (and were pretty limited).
Solution 2:
I use YAHP.
http://www.allcolor.org/YaHPConverter/
It does have CSS. I have had issues with some CSS styles, such as the roundborder ones specific to chrome/firefox, but it does have CSS. I can't remember ever having a problem with CSS images.
Solution 3:
Try this HTML to PDF converver: http://pd4ml.com/index.htm. It's writen purely in Java
Solution 4:
Try the Adobe -Generate PDF API (Java)-- http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/common/html/wwhelp.htm?context=sdkHelp&file=000447.html - here you can see the how to, and at the bottom, a quickstart which contains working sample java code to convert a web page into PDF.
Solution 5:
Prince XML is the best and easiest to use PDF generator I've used. A commercial license costs a pretty penny, but if you're OK with a small watermark on the first page of your document, the free version is great. It can be integrated with a number of programming languages, including Java.
Post a Comment for "Java - Converting Html With Images In Css To Pdf"