opensagres / xdocreport

XDocReport means XML Document reporting. It's Java API to merge XML document created with MS Office (docx) or OpenOffice (odt), LibreOffice (odt) with a Java model to generate report and convert it if you need to another format (PDF, XHTML...).
https://github.com/opensagres/xdocreport
1.21k stars 371 forks source link

ODT <meta:document-statistic> is not updated #341

Open ldvcgllm opened 5 years ago

ldvcgllm commented 5 years ago

The values for <meta:document-statistic> in meta.xml are not updated after processing.

When the file is opened in OpenOffice, LibreOffice or Word, the app scan the file to get the values. Saving the file after the scan will save the values in meta.xml and will not rescan on opening.

For a large file, this is really slow and can lead to a crash of the app.

A workaround to avoid partially the scan is to set high values manually (in our tests, we set 100k) for : paragraph-count, word-count, character-count, non-whitespace-character-count. Then, the file opens really faster but the app still scans the page-count.

We tried with :

angelozerr commented 5 years ago

Any PR are welcome!