This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am using Apache FOP technology to convery an HTML document into a PDF. Since the day this functionality was developed, it is broken and I found out that if generated HTML contains "nbsp;" Pdf generation fails and I get the message that the file is damaged.
I am using xhtml2fo.xsl for rendering of the FO elements which is an open source tool for rendering onto PDF document.
I think I have to customize the xsl but I dont know how to do that. Can anyone suggest a way to achieve that? Are any other tools available in the market? Howz iText in converting HTML to PDF?
Let me know if you need more details from my side.
I'm just guessing here, because you didn't post any error messages. And you didn't tell us what you were using to parse the HTML either. Or what version of HTML it was. So all I can suggest is that you use a proper HTML parser instead of an XML parser (if that's what you are doing) or make sure your parser accesses the DTD properly (the one which contains the definitions of all the HTML entities).
Joined: Nov 06, 2008
I am using iFrame's DesignMode property to show an editor. User performs some operation which generates default HTML elements. I just add HTML and BODY tage beafore and after the content and then use Tidy to verify my HTML and then use FOP.
Hope I am clear, if not let me know what else info you require.