Hi, The following is a piece of the code that I write
in the perform method of an ActionForm to generate the
PDF. However, it works fine in netscape, but NOT IE.
Can someone help me with this?
Thanks!
John
File xsltfile=new File("c:/uwreportdet.xsl");
File xmlfile=new File("c:/uwreport.xml");
StringWriter writer = new StringWriter();
//XSLTransform.transform(s,
xsltfile.getCanonicalPath(),
//writer);
XSLTransform.transform(xmlfile.getCanonicalPath(),
xsltfile.getCanonicalPath(),
writer);
writer.flush();
writer.close();
System.out.println("fo file: [" +
writer.toString() + "]");
response.setContentType("application/pdf");
StringReader reader = new
StringReader(writer.toString());
Driver driver = new Driver(new
InputSource(reader), out);
driver.run();
byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
--- Ted Husted <[EMAIL PROTECTED]> wrote:
> Or the Commons-Digester :o)
>
> Ajay Chitre wrote:
> >
> > One approach would be to convert java objects to
> xml using Castor and then
> > pass the XML to FOP.
> >
> > HTH.
> >
> > -- Original Message --
> >
> > >Hi, I am looking into FOP in generating PDF in
> > >struts... the examples so far that I have seen
> are
> > >only taking static XML files and XLS files. Can
> > >someone tell me how to use FOP to generate pdf
> with
> > >dynamic XML string (generated by some java
> objects) on
> > >the fly?
> > >
> > >I would apprecaite if you could even provide me
> with
> > >some sample code.
> > >
> > >Thanks
> > >John
> > >
> > >
> >
> >__________________________________________________
> > >Do You Yahoo!?
> > >Yahoo! Sports - Coverage of the 2002 Olympic
> Games
> > >http://sports.yahoo.com
> > >
> > >--
> > >To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > >For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> > Ajay Chitre
> >
> > Diligent Team, Inc.
> > (Where Diligent People Work as a Team)
> >
> > http://www.DiligentTeam.com
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> -- Ted Husted, Husted dot Com
> -- For priority Struts support,
> -> visit http://husted.com/about/services
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>