driguh wrote:This conversion is performed on a docx file of 2 MB, from text and tables.
this document has 750 pages and 111,900 words. My biggest problem is in a chapter of over nearly 300 pages that consists of a single large table with hundreds of lines. Only in this chapter, the conversion viaXSLFO spends 82 seconds.
Based on these parameters, the total time spent is normal? is there any other way to accomplish this conversion in less time?
I haven't converted documents of that length myself, but I suspect that is not abnormal
Conversion via XSL FO is in 2 steps. The first step creates an XSL FO file, and then in the second step, FOP is used to convert that to PDF.
It would be useful to know how long the second step takes.
Setting org.docx4j.convert.out.pdf.viaXSLFO.Conversion.setSaveFO(File save) will save the XSL FO file for you.
You can then use FOP on that, quite independent of docx4j, and tell us how long that takes.
It would also be useful to see how long FOP takes on just the 300 page table.
Back in docx4j, you can also turn off log4j debugging to speed things up.
As you are aware, there are the two alternative methods of creating a PDF. I have no idea whether they will be faster or slower, or whether their output quality will be satisfactory for you.
You can try them by adding their sources so they get compiled, and their dependencies (noted I think in the pom) - hopefully that will suffice - or if it doesn't, then by downloading the earlier version of docx4j in which they are part of the main source tree (they were moved for v 2.5, so try v2.4).
Please let us know what you find.