[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-user
Subject:    Re: XML2PDF formatting progress
From:       Glen Mazza <gmazza () apache ! org>
Date:       2005-05-28 12:23:33
Message-ID: 429862C5.8060303 () apache ! org
[Download RAW message or body]

I would think, in order to give a progress indicator, FOP while running 
would need to know where the end of the input is (how else could FOP 
declare itself to be 25% done, 50% done, etc.).  But FOP does not do 
such preprocessing, it processes the data as it gets it (well, starting 
at the end of each fo:page-sequence it finds), without knowledge of the 
number of future fo:page-sequences to be found.  So I don't think FOP 
would ever know itself how much finished it is with its input, and hence 
would not be able to report on it.

Also I believe the two parts you mention are not discrete, but happen 
simultaneously (we use SAX processing internally.)

But in the future 1.0 version (not 0.20.5), you will be able to 
programmatically override the FOEventHander (which signals the start/end 
of most FO's occured while processing), and I think here you would be 
able to set a counter/fire an event for the "end" of each 
fo:page-sequence as it occurs, before calling the default processing.  
If you were to preprocess the document separately and get a count of 
fo:page-sequences to begin with--you can get a % done that way.  Problem 
is, however, it would be time consuming to run the "first part" 
mentioned below another time just to get that total count.  Also, 
differing sizes of the fo:page-sequences would make that percentage 
questionable.

Glen


alex wrote:

> Hi,
>
> I'm using FOP 0.20.5 embedded in a formatting project, where I have
> XML + XSL = FO => PDF. Everything works fine, but I would like to
> display a progress bar indicating transformation progress from
> XML to XSL-FO (first part) and from XSL-FO to PDF (second part).
>
> I have searched very intensively for a solution, but couldn't find
> any way to determine the progress.
>
> Does anyone have an idea on how to approach my problem ?
>
> I thought about modifying the fop source at the point, where the
> System.out gets the [INFO] about whats going on, so as to notify
> my application thereof. But I haven't found that point yet.
> Anyone a suggestion ?
>
> thx for the help
> Alex Dima
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic