Solution Solutions |
Advantages |
Disadvantages |
Jacob |
Powerful features |
Direct call to the VBA interface, the program is very complex, the server must be: Windows System + Office installation, server-side Automation COM interface prone to death process caused by server downtime |
Apache POI |
Powerful operation on Excel; cross-platform |
The ability to manipulate word is weak; You must write different code for DOC and docx two document formats; poor compatibility |
IText |
general function; cross-platform |
You can only generate RTF-formatted files, not real Word file formats |
Java2word |
Powerful, relatively simple code |
Just a package for Jacob, with all the shortcomings of Jacob. |
Freemarker |
The code is relatively simple; cross-platform |
Template making complex, you need to save the file XML, and then set a special tag in the large XML; not a standard Word file format |
Pageoffice |
Powerful, cross-platform, compatible with all Word formats; simple code |
Pure server-side build files are not supported |
[Reprint] Comparison of the pros and cons of various Java-generated word solutions