How to get document generation progress in XDocReport?

a 夏天 提交于 2019-12-08 09:18:36

问题


In our project, report generation can take a very long time. Is there a way to obtain number of generated pages while the document is processed?

Simple progress bar is not enough, we need to show users that something is really happening.


回答1:


XDocReport doesn't provide a kind of progress monitor. I think this idea could be interesting, please create an issue for that.

It should be interesting too to know where report generation can take a very long time. The report process is :

  1. generate docx (or odt) from a docx (or odt) template. Is this step takes time? If it takes time, I think you don't use XDocReport cache (retrieve the report from the registry instead of loading very time the docx/odt template)

  2. convert the generated docx to PDF. I think this step can takes time. For that, I'm afraid that you cannot improve performance.

The progress monitor could track step 1 and 2:

  • for step 1 you cannot know the page because docx doesn't contain information about page.
  • for step 2 I think we could track PDF page if you use our POI/iText converter that we will able to modify to support progress monitor.


来源:https://stackoverflow.com/questions/25399223/how-to-get-document-generation-progress-in-xdocreport

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!