I'm using Fop in client-server (webstart). Creating the Fop classes and the Java Transformer classes on the server is a lot faster than creating them on the client.
I've been looking through the Fop source and it appears the org.apache.fop.render.awt.viewer.PreviewPanel object actually requires you to render output when you attempt to display a page, either by linking it to an FOUserAgent object which is linked to an Fop object which is linked to a Result object and calling a transform method on that Result, or by passing in a Renderable object (contains FO code) which then creates that Fop object and links it with a SAXResult then creates the transformer and renders it. The PreviewPanel also extends JPanel which implements Serializable. This should mean that I should be able to create a PreviewPanel on the server and copy it down to the client. Is there any reason the value for displaying in the PreviewPanel must be passed in this way, as an unrendered object which must attempt to render on the client (which requires the Fop class object and the Transformer object to be created), or can we have it render the results on the server then copy/serialize it to the client with the rendered results in it? I have the 1.0 source code where I can attempt to add that for my use. If that will work it would be a great benefit to add it to the project. I haven't seen anyone else on the lists mentioning the preview portion of the project so it's likely no one has mentioned it before because that piece is not widely used yet. There might be more people who would use it if this performance problem could be fixed.