Thanks Oliver for the reply..I did look into this and as u said, this is the way...But I have another question..
Is there any way to directly convert from HTML or JSP to pdf?I mean why do i have to write xsl again just to create the page layout when I do already have the page layout created in jsps or generated html?And I dont have any special formatting requiremants... So is there any such API / product available? regards, Shirish -----Original Message----- From: olivier.rossel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:30 PM To: struts-user Subject: RE: What is the best way to convert a given set of data(Value bea n List ) in PDF format...?? > Hi all, > I have following requirement in our struts application. > .After user does a query on database,a set of records is > returned to him on > screen in a table format.He can then ask the same data to be > given in PDF > format so that he can print it. > My question is what is the best way to do this? > Right now,after the user does the query, the actions get a > ValueBean list from > Model layer and the same is displayed using struts html tags > in on the page.So > my idea was to use Cacoon FOP ..Which i think needs me to > convert the value > objects to Xml format first which can then be converted in > pdf using xsl... > > Any suggestions...Experiences about the same are welcome.I am > sure many people > must be doing this in thier struts app. already...So i just > dont want to follow > the best practice. FOP is a XSL-FO formatter. So you need to provide a well-formed XSL-FO document. You can transform your beans into XML (probably Castor can do that for you) then you will have to write a XSL stylesheet to transform your source XML into XSL-FO. Then FOP will transform that in PDF. Did I mention Cocoon do that VERY easily :-) (thanks to its CastorGenerator and its FOPserializer) This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>