cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <>
Subject Re: FOP 0.17 & Cocon.
Date Mon, 19 Feb 2001 19:55:48 GMT
Andres Voldman <> wrote:
>I'm using  Cocoon 1.8.2 . This version of cocoon includes FOP version 0.15. 
>I've been working
>with it, but I need to upgrade to a FOP version  >= 0.16 because, 
>compression is only supported
>from versions 0.16 and up.
>I've tried to install FOP 0.17, but I have the following problem:
>The class org.apache.fop.apps.Driver in version 0.15 includes a function 
>called "SetWriter", which is
>called from "FO2PDFFormatter.format". But this function is missing in FOP 
>0.17, which now
>includes a function "SetOutputStream" instead.
>Have you face this problem???
>Is there any method to get an outputStream from a Writer???

At a guess, you could do this:

ByteArrayOutputStream out = new ByteArrayOutputStream ();
setOutputStream (out);
// invoke FOP here
writer.write (out.getBytes ());

This is not guaranteed to work, you might have encoding problems.

Anyway, it is top priority to fix this cleanly for the next version of 
Cocoon, by passing an outputstream instead of a writer to Formatters. 
However I'm a bit busy right now to work on Cocoon.

Get Your Private, Free E-mail from MSN Hotmail at

View raw message