A friend uses fusionchart in his project and needs to provide the word download function for multiple reports.
There is no doubt that it is only a very difficult problem.
Fusionchart provides the function of generating images on the server and the client, which is based on the flash display on the client.
My friend's project is based on Linux, and the com mechanism of the Office itself cannot be called through Jacob.
Java-only word, poi, and docx4j operations can generate WORD Documents, tables, and insert images.
A feasible idea is to open the flash charts on a new page when you click to download a report, and then call the fusoinchart function to generate images on the server,
Finally, JS calls servlet to generate the doc, and inserts each image generated in the previous step into the document.
The performance of this curve saving the nation is very low.
The second idea is to insert Flash directly into the word as the form of OLE to the word, and mix it with other content. The performance of this method should be OK, and the flash will be rendered in real time after the word is opened.
However, if you find that word uses Ole Doc, you cannot use hwpf. You can only spell Biff files a little bit by yourself. This is really hard to do, and you still don't know if Ole can be displayed.
Give up. PS: It is found that the simple support for ActiveX is provided in the wfe-processing PPT function... I will go ..
The third idea is to get the data of the generated chart and directly use the office chart function. Unfortunately, it is found that this function is not available in hwpf, which is available in hssf's Excel processing function.
The last method is relatively simple and feasible, and the performance is acceptable. The background uses jfreechart to generate images and then generates Word documents.
The downside is that the chart style is different from that of fusion. Jfree is too ugly. However, this method is the most suitable method currently.