Not sure how you want to do that or what exactly you had in mind. FOP doesn't have access to the original InputStream. FOP just receives a series of SAX events through the SAX ContentHandler exposed by Fop.getDefaultHandler(). Furthermore, page production is not proportional to the input that comes in. Layout is always triggered at the end of a page-sequence: FO tree build-up, layout page-sequence, more FO tree build-up, layout next page-sequence, etc. etc. Efforts are underway to make this process more parallel, but for the time being, that's how it works. No chance for a progress bar with percentages. The only thing possible is to indicate how many page-sequences and pages have already been generated.
On 18.06.2008 07:11:03 Daniel Noll wrote: > On Tuesday 17 June 2008 17:36:07 Jeremias Maerki wrote: > > FOP receives streamed input and therefore has no chance to provide > > information for a progress bar (at least in percent). Now that we have > > an event facility, we could add some progress events like a "new page" > > event that gets called each time a page has been created. But we would > > still not know how many pages there will be in order to calculate a > > percentage. > > If we could somehow rely on it reading it in a streamed fashion (i.e. the > data > for page 21 is not read until the previous content is already completely > handled) then intercepting the InputStream itself would allow a % readout. > > I think Java already had such a utility class but I haven't tried using it > with FOP before. > > Daniel Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
