I have thought of a way of doing this which only involves a couple of
internal classes.

1. Create a new event response type (lets call is FopPdf)
   public class FopPdf {
      private RenderCommand fopRenderCommand;
      private String fileName;
   }

2. Create a FopPdfComponentEventResultProcessor which does the following:
2a. Use an instance of RenderCommandComponentEventResultProcessor to
convert the RenderCommand to XML (FOP)
2b. Use apache FOP to create the PDF binary and construct a StreamResponse.
2c. Use StreamResponseResultProcessor to push the StreamResponse to the
HTTPResponse

3. In your AppModule, register the FopPdfComponentEventResultProcessor to
handle responses of type FopPdf

4. Return FopPdf from a page's onActivate() or from a component's event
handler method.

Reply via email to