Douglas,

NOTE: I've changed the Subject.

On Aug 25, 2004, at 6:25 AM, Oosterbaan, Douglas S. (LNG-DAY) wrote:
I'm running FOP as an embedded service. What kind of statistics
can I get back from FOP after it has completed formatting? For
example, can I get:
-- page count
-- line count
-- byte count
-- total formatting time
-- if an error occurred, can I get how many pages successfully
formatted before the error?
-- estimated percentage complete while it is in the middle of a large formatting job?
-- any other data?


Is there a result structure that gets populated and returned when
formatting occurs, such that I can get statistics back through that
structure?

There is not one that I am aware of (I don't do embedded work ATM, although some in my company are doing some of that). I would suspect, that the logging tools being used may output some of this information. Barring that, I do know that FOP outputs some of this information by default (e.g., [INFO] [1], [INFO] [2], which indicate pages output). When DEBUG mode is used (-d from Command Line Interface) the number of pages in the last sequence (e.g., [DEBUG] Last page-sequence produced 2 pages.).


You could enable logging, and then have your program go through the log and parse this information. Here's some sample output for generating a PDF ffile, which has one 'flowing' page-master, and a second page-master which shows up at the end (last):

[INFO] setting up fonts
[INFO] [1]
[WARNING] Sum of fixed column widths 513070 greater than maximum specified IPD 510236
[INFO] [2]
[DEBUG] Last page-sequence produced 2 pages.
[INFO] [3]
[DEBUG] Last page-sequence produced 1 pages.
[INFO] Parsing of document complete, stopping renderer
[DEBUG] Initial heap size: 4496Kb
[DEBUG] Current heap size: 8874Kb
[DEBUG] Total memory used: 4377Kb
[DEBUG] Memory use is indicative; no GC was performed
[DEBUG] These figures should not be used comparatively
[DEBUG] Total time used: 10110ms
[DEBUG] Pages rendered: 3
[DEBUG] Avg render time: 3370ms/page


I've found a lot of examples setting up FOP and running it, but I
haven't seen anything that captures statistics after the formatting
is complete.

Thanks.

If you do come up with something, please post it back to the list so others may benefit.


Web Maestro Clay


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to