On Tuesday 27 January 2009 23:21:32 ManiKanta G wrote: > > i am trying to load page from url and write in to the pdf. > > can please reviw my code and send the solution. > > if u want any more information send me mail. > > This is a bit interesting situation... I m eager to listen... feel free to > share that will us too... though it is off topic I dont mind... after all > we are here to learn some thing... >
I'm thinking there aren't a lot of responses because this is not as trivial a problem as the OP appears to think. I've seen mention of both iText and FOP, but in my experience, neither can easily go from HTML to PDF. I know, personally, I have trouble creating HTML that will render consistently across browsers, to try to create a tool to render HTML and output a PDF is a tall task. Maybe rather than trying to find a Java library to do it, you could look into hooking into a rendering engine (Gecko? WebKit?) and then linking to a Ghostscript libraries. If you're a talented C Programmer, you might be better off in this situation. Of course, if you are not required to generate a PDF that resembles a view that a browser would render, then you might be able to find an XSLT that transforms XHTML into XSLFO which FOP could then convert to PDF. However, since you mention that you want to load a page from a URL, I'm guessing that you can't trust the source doc to be valid XML. Just my $.02 -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org