Original demand
java-web project a page, users can upload word documents, document name displayed in the table after the upload page, it is necessary to provide word document online preview, download function.
To find solution
There are three main demand points, respectively, upload, preview and download the word document, upload and download files not to say, the main difficulty lies in the preview. Looking for information to find ways to solve the following categories:
Using the POI to convert word document to html
Now POI for word document processing is very powerful, not for some simple documents deal with the problem, but for some complex documents have snacks tired , and users to upload documents is relatively complex document, in addition to complex there are a lot of pictures outside the table, so give up this way.
Use Microsoft or Google's online document preview service
This method is not feasible, the use of Microsoft and Google's online services need to provide a link to the document preview word document to them, and the client files are to be kept confidential and can not be leaked outside.
Use Apache OpenOffice word will be converted to PDF
Apache OpenOffice supports a variety of environments, and is open source, I have not used this way, I would like to know if you can refer to: https://blog.csdn.net/a1786223749/article/details/79461070
Use aspose convert PDF to word
aspose is a very powerful office document processing software, you can achieve the perfect word document into a pdf file, the disadvantage is that the software is required to pay. But the Internet can find a lot of crack version jar package, test the effect is still very good, and easy to use, is used in the project in this way.
Use aspose convert word to PDF
Word2PdfUtil
/*
* AAAAAAAAAAAAA有限公司拥有本软件版权2018并保留所有权利。
* AAAAAAA