Realize the mutual conversion of HTML and word (with pictures)

Spring boot and Maven are used at the back end of the project, and ckedit rich text editor is used at the front end. At present, the word converted from HTML is in doc format, while the image processing supports docx format, so you need to manually save doc as docx before you can replace the image.

In 2021, when I came back to fill in the pit, I came across the scene that HTML needs to be converted into word. At present, there are the following solutions for the export of pictures with unfixed format:

The back end only does some style processing, and the export work is left to the front end. See Part IV for code implementation.

I Add Maven dependency

II Convert word to HTML

III Convert HTML to word

IV Front end implementation of HTML to word

Java code implementation

Vue code implementation

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>