Chetan,

found my failure! 
I used driver.run(), but have to use driver.format() and driver.render() instead.
Now everthing works fine.

Thanks anyway!

> -----Ursprüngliche Nachricht-----
> Von: Chetan Vig [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 29. Juni 2001 15:45
> An: [EMAIL PROTECTED]
> Betreff: Re: org.apache.fop.apps.FOPException: InputSource is not set.
> 
> 
> Hi Erik,
> 
> try this
> 
>       InputSource fo = new InputSource(new
> java.io.ByteArrayInputStream(baos.toByteArray()));
>       Driver driver = new Driver();
>       driver.setRenderer(Driver.RENDER_PDF);
>       driver.setOutputStream(out);
> 
> driver.buildFOTree((org.xml.sax.XMLReader)(saxParserFactory.ne
> wSAXParser().getParser()),
> fo);
>       driver.format();
>       driver.render();
> 
> 
> -Chetan
> 
> 
> Erik Rehrmann wrote:
> 
> > Hi all,
> >
> > does anybody know the reason why this exception occurs?
> > I want to render xml/xsl files to pdf within a servlet.
> > The xmlFile is generated within the servlet and the xslFile 
> is statically available.
> >
> >       Driver driver = new Driver();
> >       driver.setRenderer(Driver.RENDER_PDF);
> >       InputHandler inputHandler = new 
> XSLTInputHandler(xmlFile, xslFile);
> >       org.xml.sax.XMLReader parser = inputHandler.getParser();
> > ->      driver.buildFOTree(parser, inputHandler.getInputSource());
> >       driver.format();
> >       driver.setOutputStream(out);
> >       driver.run();
> >
> > Any idea?
> >
> > Thanks in advance,
> > _______________________________________
> > Erik Rehrmann - IOn AG
> > [EMAIL PROTECTED]
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to