tomj74 / chunk-templates

Chunk Templates, a template engine for Java
http://www.x5software.com/chunk/
MIT License
77 stars 10 forks source link

Request Progress monitor #33

Closed gilshallem closed 3 years ago

gilshallem commented 4 years ago

Hi, Thank you very much for the awesome library. working well for me on android. I would like to request that you add a way to track the progress of the rendering when i do pageChunk.render(writer);

I use it to render very big files so it can be helpful. Thank you

tomj74 commented 3 years ago

Sorry, I don't see a way to implement this. Due to the recursive nature of the rendering process, there's no good indicator internally that would be useful to expose as a rendering progress data point.

You could pass it a custom writer that monitors its own output and makes periodic callbacks? If you have a rough idea of the expected size of the output, wrapping the writer could help you make some estimates that way?