ARTICLE AD BOX
I am doing back-end development of springboot+java8. Now for some reason the frontend needs to preview the file. I would like to know if there is a way to convert pdf, word, excel, etc. into images to facilitate front-end preview. Or any other preview method. NOTE: The frontend cannot download files (I have no control over this due to some security issues)
I asked AI and got some simple answers: use Apache POI or Docx4j to convert word to PDF, and then convert PDF to image, but at the same time AI also told me that Apache POI and Docx4j cannot do a complete word to pdf and cannot process excel. They can only read text content and cannot convert formats.
In addition, I also partially understand LibreOffice, but it requires additional deployment on the server and cannot be packaged into a jar package. It may be my last choice.
Therefore, I would like to know if there are other solutions that can perfectly preview PDF, word, excel and other files.
For possible solutions, my priority is:
1. To achieve the effect, at least it needs to be applicable to both word and pdf, and the format cannot be lost.
2. Open source or free
3. Can be packaged directly into a jar package without additional deployment or complicated settings.
